You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
40 lines
1.3 KiB
Dart
40 lines
1.3 KiB
Dart
import 'package:finger_print_verification/core/network/network.dart';
|
|
import 'package:finger_print_verification/fingerprint/view/fingerprint.dart';
|
|
import 'package:finger_print_verification/theme/app_theme.dart';
|
|
import 'package:flutter/material.dart';
|
|
import 'package:dio/dio.dart';
|
|
|
|
void main() {
|
|
// ── Configure the global API client BEFORE runApp() ───────────────────────
|
|
// All relative URLs (e.g. '/verify') will be resolved against this base URL.
|
|
// Replace the placeholder with your real endpoint before going to production.
|
|
ApiClient.initialize(
|
|
baseUrl: 'https://hmgpharmacyapi.hmg.com/fingerprint/',
|
|
connectTimeout: const Duration(seconds: 60),
|
|
receiveTimeout: const Duration(seconds: 30),
|
|
interceptors: [
|
|
LogInterceptor(
|
|
requestBody: true,
|
|
responseBody: true,
|
|
logPrint: (object) => debugPrint(object.toString()), // Recommended for Flutter
|
|
),
|
|
]
|
|
);
|
|
|
|
runApp(const MyApp());
|
|
}
|
|
|
|
class MyApp extends StatelessWidget {
|
|
const MyApp({super.key});
|
|
|
|
// This widget is the root of your application.
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return MaterialApp(
|
|
title: 'Fingerprint Verification',
|
|
theme:AppTheme.light(),
|
|
home: const FingerprintView(),
|
|
);
|
|
}
|
|
}
|