- Update Android package namespace and applicationId to dev.fiatcode.tracpulse - Update AndroidManifest.xml package and app label to TracPulse - Move all Kotlin source files to dev/fiatcode/tracpulse/ package - Update pubspec.yaml name to tracpulse - Update all Dart imports from package:traccar_client to relative - Rename TraccarClientApp class to TracPulseApp - Update user-facing strings in permission_screen to TracPulse - Update notification channel label and wakeLock tag to TracPulse
64 lines
1.8 KiB
Dart
64 lines
1.8 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:flutter/services.dart';
|
|
import 'main_screen.dart';
|
|
import 'permission_screen.dart';
|
|
import 'preferences.dart';
|
|
|
|
void main() async {
|
|
WidgetsFlutterBinding.ensureInitialized();
|
|
await Preferences.init();
|
|
|
|
// Keep status bar dark throughout the app
|
|
SystemChrome.setSystemUIOverlayStyle(
|
|
const SystemUiOverlayStyle(
|
|
statusBarColor: Color(0xFF0d0d0d),
|
|
statusBarIconBrightness: Brightness.light,
|
|
),
|
|
);
|
|
|
|
runApp(const TracPulseApp());
|
|
}
|
|
|
|
class TracPulseApp extends StatelessWidget {
|
|
const TracPulseApp({super.key});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return MaterialApp(
|
|
title: 'TracPulse',
|
|
debugShowCheckedModeBanner: false,
|
|
theme: ThemeData(
|
|
useMaterial3: true,
|
|
brightness: Brightness.dark,
|
|
scaffoldBackgroundColor: const Color(0xFF0d0d0d),
|
|
colorScheme: const ColorScheme.dark(
|
|
surface: Color(0xFF0d0d0d),
|
|
primary: Color(0xFF00bcd4),
|
|
secondary: Color(0xFF00e676),
|
|
),
|
|
appBarTheme: const AppBarTheme(
|
|
centerTitle: true,
|
|
backgroundColor: Color(0xFF161616),
|
|
foregroundColor: Color(0xFFe0e0e0),
|
|
elevation: 0,
|
|
),
|
|
snackBarTheme: const SnackBarThemeData(
|
|
backgroundColor: Color(0xFF1a1a1a),
|
|
contentTextStyle: TextStyle(
|
|
fontFamily: 'monospace',
|
|
color: Color(0xFFe0e0e0),
|
|
),
|
|
),
|
|
pageTransitionsTheme: const PageTransitionsTheme(
|
|
builders: {
|
|
TargetPlatform.android: ZoomPageTransitionsBuilder(),
|
|
TargetPlatform.iOS: CupertinoPageTransitionsBuilder(),
|
|
},
|
|
),
|
|
),
|
|
home: Preferences.permissionsGranted
|
|
? const MainScreen()
|
|
: const PermissionScreen(),
|
|
);
|
|
}
|
|
}
|