Explorar o código

[new]增加项目配置内容

zhoukun hai 11 meses
pai
achega
bf74c79c2e

+ 47 - 10
android/app/build.gradle.kts

@@ -7,8 +7,8 @@ plugins {
 
 android {
     namespace = "com.trace.location"
-    compileSdk = flutter.compileSdkVersion
-    ndkVersion = flutter.ndkVersion
+    compileSdk = rootProject.extra["compileSdkVersion"] as Int
+    ndkVersion = rootProject.extra["ndkVersion"] as String
 
     compileOptions {
         sourceCompatibility = JavaVersion.VERSION_11
@@ -21,22 +21,59 @@ android {
 
     defaultConfig {
         // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
-        applicationId = "com.trace.location"
+        applicationId = rootProject.extra["applicationId"] as String
         // You can update the following values to match your application needs.
         // For more information, see: https://flutter.dev/to/review-gradle-config.
-        minSdk = flutter.minSdkVersion
-        targetSdk = flutter.targetSdkVersion
+        minSdk = rootProject.extra["minSdkVersion"] as Int
+        targetSdk = rootProject.extra["targetSdkVersion"] as Int
         versionCode = flutter.versionCode
         versionName = flutter.versionName
+
+        ndk {
+            //noinspection ChromeOsAbiSupport
+            abiFilters.add("arm64-v8a")
+        }
+    }
+
+    signingConfigs {
+        create("location") {
+            storeFile = file("keystore/location.jks")
+            storePassword = "location888"
+            keyAlias = "location"
+            keyPassword = "location888"
+        }
     }
 
-    buildTypes {
-        release {
-            // TODO: Add your own signing config for the release build.
-            // Signing with the debug keys for now, so `flutter run --release` works.
-            signingConfig = signingConfigs.getByName("debug")
+    android {
+        buildTypes {
+            getByName("debug") {
+                // Note: The debug build type must have the same signing config as the main build type.
+                signingConfig = signingConfigs.getByName("location")
+            }
+            getByName("release") {
+                // TODO: Add your own signing config for the release build.
+                // Signing with the debug keys for now, so `flutter run --release` works.
+                isMinifyEnabled = true
+                proguardFiles(
+                    getDefaultProguardFile("proguard-android-optimize.txt"),
+                    "proguard-rules.pro"
+                )
+                signingConfig = signingConfigs.getByName("location")
+            }
         }
     }
+
+//    applicationVariants.all { variant ->
+//        val date = java.text.SimpleDateFormat("yyMMddHHmmss").format(Date()) // 改用 SimpleDateFormat
+//        variant.outputs.configureEach { // 使用 configureEach 替代 all
+//            val fileName = "${defaultConfig.applicationId}-" +
+//                    "v${defaultConfig.versionName}-" +
+//                    "${variant.buildType.name}-" +
+//                    "${date}.apk"
+//            this as com.android.build.gradle.internal.api.BaseVariantOutputImpl // 强制类型转换
+//            outputFileName.set(fileName) // 正确设置文件名
+//        }
+//    }
 }
 
 flutter {

+ 128 - 0
android/app/proguard-rules.pro

@@ -0,0 +1,128 @@
+# Add project specific ProGuard rules here.
+# You can control the set of applied configuration files using the
+# proguardFiles setting in build.gradle.
+#
+# For more details, see
+#   http://developer.android.com/guide/developing/tools/proguard.html
+
+# If your project uses WebView with JS, uncomment the following
+# and specify the fully qualified class name to the JavaScript interface
+# class:
+#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
+#   public *;
+#}
+
+# Uncomment this to preserve the line number information for
+# debugging stack traces.
+#-keepattributes SourceFile,LineNumberTable
+
+# If you keep the line number information, uncomment this to
+# hide the original source file name.
+#-renamesourcefileattribute SourceFile
+-dontshrink
+
+## Log
+-assumenosideeffects class android.util.Log {
+    public static *** d(...);
+    public static *** v(...);
+    public static *** w(...);
+    public static *** i(...);
+    public static *** wtf(...);
+}
+-assumenosideeffects class com.atmob.common.logging.AtmobLog {
+    public static *** d(...);
+    public static *** v(...);
+    public static *** w(...);
+    public static *** i(...);
+    public static *** wtf(...);
+}
+
+## native
+-keepclasseswithmembernames class * {
+    native <methods>;
+}
+
+## res
+-keepclassmembers class **.R$* {
+    public static <fields>;
+}
+
+## ViewBinding & DataBinding
+-keep class * implements androidx.viewbinding.ViewBinding {
+    public inflate(android.view.LayoutInflater);
+    public inflate(android.view.LayoutInflater, android.view.ViewGroup, boolean);
+}
+
+# common config end
+
+# RxJava start
+-dontwarn java.util.concurrent.Flow*
+# RxJava end
+
+# Glide start
+-keep public class * implements com.bumptech.glide.module.GlideModule
+-keep class * extends com.bumptech.glide.module.AppGlideModule {
+ <init>(...);
+}
+-keep public enum com.bumptech.glide.load.ImageHeaderParser$** {
+  **[] $VALUES;
+  public *;
+}
+-keep class com.bumptech.glide.load.data.ParcelFileDescriptorRewinder$InternalRewinder {
+  *** rewind();
+}
+# Glide end
+
+# Turbo start
+-keep class com.plutus.common.turbo.beans.** {*;}
+# Turbo end
+
+# bugly start
+-dontwarn com.tencent.bugly.**
+-keep public class com.tencent.bugly.**{*;}
+# bugly end
+
+# Umeng start
+-keep class com.umeng.** {*;}
+-keep class org.repackage.** {*;}
+-keepclassmembers class * {
+   public <init> (org.json.JSONObject);
+}
+-keepclassmembers enum * {
+    public static **[] values();
+    public static ** valueOf(java.lang.String);
+}
+# Umeng end
+
+#oaid miitmdid start
+-keep class com.bun.miitmdid.core.** {*;}
+-keep class com.bun.lib.**{*;}
+-keep class XI.CA.XI.**{*;}
+-keep class XI.K0.XI.**{*;}
+-keep class XI.XI.K0.**{*;}
+-keep class XI.vs.K0.**{*;}
+-keep class XI.xo.XI.XI.**{*;}
+-keep class com.asus.msa.SupplementaryDID.**{*;}
+-keep class com.asus.msa.sdid.**{*;}
+-keep class com.bun.lib.**{*;}
+-keep class com.bun.miitmdid.**{*;}
+-keep class com.huawei.hms.ads.identifier.**{*;}
+-keep class com.samsung.android.deviceidservice.**{*;}
+-keep class org.json.**{*;}
+-keep public class com.netease.nis.sdkwrapper.Utils {
+public <methods>;
+}
+
+#
+-keep class androidx.core.content.FileProvider { *; }
+-keep class android.support.v4.content.FileProvider { *; }
+
+#oaid miitmdid end
+
+#flutter start
+
+-keep class io.flutter.** { *; }
+
+#flutter end
+
+

+ 7 - 0
android/build.gradle.kts

@@ -1,4 +1,11 @@
 allprojects {
+    extra.apply {
+        set("compileSdkVersion", 33)
+        set("applicationId", "com.atmob.location")
+        set("minSdkVersion", 21)
+        set("targetSdkVersion", 33)
+        set("ndkVersion", "27.0.12077973")
+    }
     repositories {
         maven { url = uri("https://maven.aliyun.com/repository/gradle-plugin") }
         maven { url = uri("https://maven.aliyun.com/repository/google") }

+ 28 - 0
assets/color/color.xml

@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+    <color name="transparent">#00FFFFFF</color>
+    <!--主题色文字色彩-->
+    <color name="colorPrimary">#374BFF</color>
+    <!--主题色点缀色-->
+    <color name="colorAccentPrimary">#6399FF</color>
+    <!--主题色背景色-->
+    <color name="bgColorPrimary">#F5F6F8</color>
+    <!--主题色背景色-->
+    <color name="colorPrimaryLight">#F6FAFF</color>
+
+    <!--主要文字色彩-->
+    <color name="primaryTextColor">#E6000000</color>
+    <!--次要文字色彩-->
+    <color name="secondaryTextColor">#99000000</color>
+    <!--占位符文字色彩-->
+    <color name="placeholderTextColor">#66000000</color>
+    <!--文字disabled态-->
+    <color name="disabledTextColor">#42000000</color>
+    <!--文字反色色彩-->
+    <color name="inverseTextColor">#FFFFFFFF</color>
+
+
+    <!--导航栏未选中时文本颜色-->
+    <color name="TabUnSelectTextColor">#FFB8C1D6</color>
+
+</resources>

+ 48 - 0
assets/color/common_color.xml

@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+    <!-- 白色 -->
+    <color name="white">#FFFFFFFF</color>
+    <color name="white95">#F2FFFFFF</color>
+    <color name="white90">#E6FFFFFF</color>
+    <color name="white87">#DEFFFFFF</color>
+    <color name="white85">#D9FFFFFF</color>
+    <color name="white80">#CCFFFFFF</color>
+    <color name="white75">#BFFFFFFF</color>
+    <color name="white70">#B3FFFFFF</color>
+    <color name="white65">#A6FFFFFF</color>
+    <color name="white60">#99FFFFFF</color>
+    <color name="white55">#8CFFFFFF</color>
+    <color name="white50">#80FFFFFF</color>
+    <color name="white45">#73FFFFFF</color>
+    <color name="white40">#66FFFFFF</color>
+    <color name="white35">#59FFFFFF</color>
+    <color name="white30">#4DFFFFFF</color>
+    <color name="white25">#40FFFFFF</color>
+    <color name="white20">#33FFFFFF</color>
+    <color name="white15">#26FFFFFF</color>
+    <color name="white10">#1AFFFFFF</color>
+    <color name="white5">#0DFFFFFF</color>
+
+    <!-- 黑色 -->
+    <color name="black">#FF000000</color>
+    <color name="black95">#F2000000</color>
+    <color name="black90">#E6000000</color>
+    <color name="black85">#D9000000</color>
+    <color name="black80">#CC000000</color>
+    <color name="black75">#B000000F</color>
+    <color name="black70">#B3000000</color>
+    <color name="black65">#A6000000</color>
+    <color name="black60">#99000000</color>
+    <color name="black55">#8C000000</color>
+    <color name="black50">#80000000</color>
+    <color name="black45">#73000000</color>
+    <color name="black40">#66000000</color>
+    <color name="black35">#59000000</color>
+    <color name="black30">#4D000000</color>
+    <color name="black25">#40000000</color>
+    <color name="black20">#33000000</color>
+    <color name="black15">#26000000</color>
+    <color name="black10">#1A000000</color>
+    <color name="black5">#0D000000</color>
+
+</resources>

+ 17 - 0
assets/string/base/string.xml

@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+    <string name="app_name">手机定位追迹</string>
+    <string name="main_tab_home">首页</string>
+    <string name="main_tab_camera">扫一扫</string>
+    <string name="main_tab_mine">我的</string>
+
+
+    <!--下拉刷新-->
+    <string name="loading_more">加载更多</string>
+    <string name="load_pull_up">上拉加载</string>
+    <string name="loading_txt">正在加载</string>
+    <string name="load_no_data">没有更多数据了</string>
+    <string name="load_failed">加载失败</string>
+
+
+</resources>

+ 1 - 0
ios/Flutter/Debug.xcconfig

@@ -1 +1,2 @@
+#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
 #include "Generated.xcconfig"

+ 1 - 0
ios/Flutter/Release.xcconfig

@@ -1 +1,2 @@
+#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
 #include "Generated.xcconfig"

+ 43 - 0
ios/Podfile

@@ -0,0 +1,43 @@
+# Uncomment this line to define a global platform for your project
+# platform :ios, '12.0'
+
+# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
+ENV['COCOAPODS_DISABLE_STATS'] = 'true'
+
+project 'Runner', {
+  'Debug' => :debug,
+  'Profile' => :release,
+  'Release' => :release,
+}
+
+def flutter_root
+  generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__)
+  unless File.exist?(generated_xcode_build_settings_path)
+    raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first"
+  end
+
+  File.foreach(generated_xcode_build_settings_path) do |line|
+    matches = line.match(/FLUTTER_ROOT\=(.*)/)
+    return matches[1].strip if matches
+  end
+  raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get"
+end
+
+require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)
+
+flutter_ios_podfile_setup
+
+target 'Runner' do
+  use_frameworks!
+
+  flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
+  target 'RunnerTests' do
+    inherit! :search_paths
+  end
+end
+
+post_install do |installer|
+  installer.pods_project.targets.each do |target|
+    flutter_additional_ios_build_settings(target)
+  end
+end

+ 30 - 0
lib/base/base_controller.dart

@@ -0,0 +1,30 @@
+import 'package:flutter/cupertino.dart';
+import 'package:get/get.dart';
+
+class BaseController extends GetxController {
+  Map? parameters;
+
+  @override
+  void onInit() {
+    super.onInit();
+    _initParameters();
+  }
+
+  void _initParameters() {
+    var getParameters = Get.parameters;
+    var getArguments = Get.arguments;
+    parameters ??= <dynamic, dynamic>{};
+    parameters?.addAll(getParameters);
+    if (getArguments != null && getArguments is Map) {
+      parameters?.addAll(getArguments);
+    }
+  }
+
+  /// 隐藏键盘
+  void hideKeyboard(BuildContext context) {
+    FocusScopeNode currentFocus = FocusScope.of(context);
+    if (!currentFocus.hasPrimaryFocus && currentFocus.focusedChild != null) {
+      FocusManager.instance.primaryFocus!.unfocus();
+    }
+  }
+}

+ 54 - 0
lib/base/base_page.dart

@@ -0,0 +1,54 @@
+import 'package:flutter/cupertino.dart';
+import 'package:flutter/material.dart';
+import 'package:flutter/services.dart';
+import 'package:get/get.dart';
+
+import 'base_view.dart';
+
+abstract class BasePage<T extends GetxController> extends BaseView<T> {
+  const BasePage({super.key});
+
+  @override
+  Widget build(BuildContext context) {
+    return AnnotatedRegion<SystemUiOverlayStyle>(
+      value: SystemUiOverlayStyle.light.copyWith(
+        statusBarColor: Colors.transparent,
+        statusBarBrightness: _getStatusBarDarkFont(),
+        statusBarIconBrightness: _getStatusIconBarDarkFont(),
+        systemNavigationBarColor: navigationBarColor(),
+        systemNavigationBarIconBrightness: _getNavigationBarDarkFont(),
+      ),
+      child: buildBoot(
+        immersive() ? buildBody(context) : SafeArea(child: buildBody(context)),
+      ),
+    );
+  }
+
+  Brightness _getStatusBarDarkFont() {
+    return statusBarDarkFont() ? Brightness.light : Brightness.dark;
+  }
+
+  Brightness _getStatusIconBarDarkFont() {
+    return statusBarDarkFont() ? Brightness.dark : Brightness.light;
+  }
+
+  Brightness _getNavigationBarDarkFont() {
+    return statusBarDarkFont() ? Brightness.dark : Brightness.light;
+  }
+
+  bool statusBarDarkFont() {
+    return true;
+  }
+
+  bool navigationBarDarkFont() {
+    return true;
+  }
+
+  bool immersive() {
+    return false;
+  }
+
+  Color navigationBarColor() {
+    return Colors.transparent;
+  }
+}

+ 40 - 0
lib/base/base_view.dart

@@ -0,0 +1,40 @@
+import 'package:flutter/cupertino.dart';
+import 'package:flutter/material.dart';
+import 'package:flutter/src/widgets/framework.dart';
+import 'package:get/get.dart';
+import 'package:get/get_state_manager/src/simple/get_view.dart';
+
+abstract class BaseView<T extends GetxController> extends GetView<T> {
+  const BaseView({super.key});
+
+  @override
+  Widget build(BuildContext context) {
+    return buildBoot(buildBody(context));
+  }
+
+  Widget buildBoot(Widget child) {
+    return GestureDetector(
+      onTap: () {
+        backgroundOnTapEvent();
+      },
+      child: Container(
+        height: viewHeight(),
+        color: backgroundColor(),
+        child: child,
+      ),
+    );
+  }
+
+  Widget buildBody(BuildContext context);
+
+  // 点击空白处
+  void backgroundOnTapEvent() {}
+
+  Color backgroundColor() {
+    return Colors.white;
+  }
+
+  double? viewHeight() {
+    return null;
+  }
+}

+ 58 - 104
lib/main.dart

@@ -1,122 +1,76 @@
 import 'package:flutter/material.dart';
+import 'package:flutter_localizations/flutter_localizations.dart';
+import 'package:flutter_screenutil/flutter_screenutil.dart';
+import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
+import 'package:get/get_navigation/src/root/get_material_app.dart';
+import 'package:location/resource/colors.gen.dart';
+import 'package:location/resource/string.gen.dart';
+import 'package:location/resource/string_source.dart';
+import 'package:location/router/app_pages.dart';
+import 'package:pull_to_refresh/pull_to_refresh.dart';
+
+void main() async {
+  WidgetsFlutterBinding.ensureInitialized();
 
-void main() {
   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: 'Flutter Demo',
-      theme: ThemeData(
-        // This is the theme of your application.
-        //
-        // TRY THIS: Try running your application with "flutter run". You'll see
-        // the application has a purple toolbar. Then, without quitting the app,
-        // try changing the seedColor in the colorScheme below to Colors.green
-        // and then invoke "hot reload" (save your changes or press the "hot
-        // reload" button in a Flutter-supported IDE, or press "r" if you used
-        // the command line to start the app).
-        //
-        // Notice that the counter didn't reset back to zero; the application
-        // state is not lost during the reload. To reset the state, use hot
-        // restart instead.
-        //
-        // This works for code too, not just values: Most code changes can be
-        // tested with just a hot reload.
-        colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
-      ),
-      home: const MyHomePage(title: 'Flutter Demo Home Page'),
+    return ScreenUtilInit(
+      designSize: const Size(360, 800),
+      builder: (_, child) {
+        return _buildMaterialApp();
+      },
     );
   }
-}
-
-class MyHomePage extends StatefulWidget {
-  const MyHomePage({super.key, required this.title});
-
-  // This widget is the home page of your application. It is stateful, meaning
-  // that it has a State object (defined below) that contains fields that affect
-  // how it looks.
-
-  // This class is the configuration for the state. It holds the values (in this
-  // case the title) provided by the parent (in this case the App widget) and
-  // used by the build method of the State. Fields in a Widget subclass are
-  // always marked "final".
-
-  final String title;
-
-  @override
-  State<MyHomePage> createState() => _MyHomePageState();
-}
-
-class _MyHomePageState extends State<MyHomePage> {
-  int _counter = 0;
-
-  void _incrementCounter() {
-    setState(() {
-      // This call to setState tells the Flutter framework that something has
-      // changed in this State, which causes it to rerun the build method below
-      // so that the display can reflect the updated values. If we changed
-      // _counter without calling setState(), then the build method would not be
-      // called again, and so nothing would appear to happen.
-      _counter++;
-    });
-  }
 
-  @override
-  Widget build(BuildContext context) {
-    // This method is rerun every time setState is called, for instance as done
-    // by the _incrementCounter method above.
-    //
-    // The Flutter framework has been optimized to make rerunning build methods
-    // fast, so that you can just rebuild anything that needs updating rather
-    // than having to individually change instances of widgets.
-    return Scaffold(
-      appBar: AppBar(
-        // TRY THIS: Try changing the color here to a specific color (to
-        // Colors.amber, perhaps?) and trigger a hot reload to see the AppBar
-        // change color while the other colors stay the same.
-        backgroundColor: Theme.of(context).colorScheme.inversePrimary,
-        // Here we take the value from the MyHomePage object that was created by
-        // the App.build method, and use it to set our appbar title.
-        title: Text(widget.title),
-      ),
-      body: Center(
-        // Center is a layout widget. It takes a single child and positions it
-        // in the middle of the parent.
-        child: Column(
-          // Column is also a layout widget. It takes a list of children and
-          // arranges them vertically. By default, it sizes itself to fit its
-          // children horizontally, and tries to be as tall as its parent.
-          //
-          // Column has various properties to control how it sizes itself and
-          // how it positions its children. Here we use mainAxisAlignment to
-          // center the children vertically; the main axis here is the vertical
-          // axis because Columns are vertical (the cross axis would be
-          // horizontal).
-          //
-          // TRY THIS: Invoke "debug painting" (choose the "Toggle Debug Paint"
-          // action in the IDE, or press "p" in the console), to see the
-          // wireframe for each widget.
-          mainAxisAlignment: MainAxisAlignment.center,
-          children: <Widget>[
-            const Text('You have pushed the button this many times:'),
-            Text(
-              '$_counter',
-              style: Theme.of(context).textTheme.headlineMedium,
-            ),
-          ],
+  _buildMaterialApp() {
+    return RefreshConfiguration(
+      headerBuilder:
+          () => const MaterialClassicHeader(color: ColorName.colorPrimary),
+      footerBuilder:
+          () => ClassicFooter(
+            canLoadingText: StringName.loadingMore,
+            idleText: StringName.loadPullUp,
+            loadingText: StringName.loadingTxt,
+            noDataText: StringName.loadNoData,
+            failedText: StringName.loadFailed,
+          ),
+      child: GetMaterialApp(
+        onGenerateTitle: (_) => StringName.appName,
+        getPages: AppPage.pages,
+        initialRoute: RoutePath.splash,
+        initialBinding: AppBinding(),
+        theme: ThemeData(
+          useMaterial3: true,
+          textSelectionTheme: const TextSelectionThemeData(
+            cursorColor: ColorName.colorPrimary, // 设置默认光标颜色
+            selectionHandleColor: ColorName.colorPrimary, // 设置光标下面水滴的颜色
+          ),
         ),
+        navigatorObservers: [FlutterSmartDialog.observer],
+        builder: FlutterSmartDialog.init(),
+        translations: StringResource(),
+        localizationsDelegates: const [
+          GlobalMaterialLocalizations.delegate,
+          //是Flutter的一个本地化委托,用于提供Material组件库的本地化支持
+          GlobalWidgetsLocalizations.delegate,
+          //用于提供通用部件(Widgets)的本地化支持
+          GlobalCupertinoLocalizations.delegate,
+          //用于提供Cupertino风格的组件的本地化支持
+        ],
+        supportedLocales: const [
+          Locale('zh', 'CN'), // 支持的语言和地区
+        ],
+        // 你的翻译
+        locale: const Locale('zh', 'CN'),
+        // 将会按照此处指定的语言翻译 添加一个回调语言选项,以备上面指定的语言翻译不存在
+        fallbackLocale: const Locale('zh', 'CN'),
       ),
-      floatingActionButton: FloatingActionButton(
-        onPressed: _incrementCounter,
-        tooltip: 'Increment',
-        child: const Icon(Icons.add),
-      ), // This trailing comma makes auto-formatting nicer for build methods.
     );
   }
 }

+ 3 - 0
lib/module/main/main_controller.dart

@@ -0,0 +1,3 @@
+import 'package:location/base/base_controller.dart';
+
+class MainController extends BaseController {}

+ 13 - 0
lib/module/main/main_page.dart

@@ -0,0 +1,13 @@
+import 'package:flutter/cupertino.dart';
+import 'package:flutter/src/widgets/framework.dart';
+import 'package:location/base/base_page.dart';
+import 'package:location/module/main/main_controller.dart';
+
+class MainPage extends BasePage<MainController> {
+  const MainPage({super.key});
+
+  @override
+  Widget buildBody(BuildContext context) {
+    return Text('123');
+  }
+}

+ 3 - 0
lib/module/splash/splash_controller.dart

@@ -0,0 +1,3 @@
+import 'package:location/base/base_controller.dart';
+
+class SplashController extends BaseController {}

+ 13 - 0
lib/module/splash/splash_page.dart

@@ -0,0 +1,13 @@
+import 'package:flutter/cupertino.dart';
+import 'package:flutter/src/widgets/framework.dart';
+import 'package:location/base/base_page.dart';
+import 'package:location/module/splash/splash_controller.dart';
+
+class SplashPage extends BasePage<SplashController> {
+  const SplashPage({super.key});
+
+  @override
+  Widget buildBody(BuildContext context) {
+    return Text('123');
+  }
+}

+ 12 - 0
lib/resource/assets.gen.dart

@@ -0,0 +1,12 @@
+/// GENERATED CODE - DO NOT MODIFY BY HAND
+/// *****************************************************
+///  FlutterGen
+/// *****************************************************
+
+// coverage:ignore-file
+// ignore_for_file: type=lint
+// ignore_for_file: directives_ordering,unnecessary_import,implicit_dynamic_list_literal,deprecated_member_use
+
+class Assets {
+  const Assets._();
+}

+ 171 - 0
lib/resource/colors.gen.dart

@@ -0,0 +1,171 @@
+/// GENERATED CODE - DO NOT MODIFY BY HAND
+/// *****************************************************
+///  FlutterGen
+/// *****************************************************
+
+// coverage:ignore-file
+// ignore_for_file: type=lint
+// ignore_for_file: directives_ordering,unnecessary_import,implicit_dynamic_list_literal,deprecated_member_use
+
+import 'package:flutter/painting.dart';
+import 'package:flutter/material.dart';
+
+class ColorName {
+  ColorName._();
+
+  /// Color: #FFB8C1D6
+  static const Color tabUnSelectTextColor = Color(0xFFB8C1D6);
+
+  /// Color: #F5F6F8
+  static const Color bgColorPrimary = Color(0xFFF5F6F8);
+
+  /// Color: #FF000000
+  static const Color black = Color(0xFF000000);
+
+  /// Color: #1A000000
+  static const Color black10 = Color(0x1A000000);
+
+  /// Color: #26000000
+  static const Color black15 = Color(0x26000000);
+
+  /// Color: #33000000
+  static const Color black20 = Color(0x33000000);
+
+  /// Color: #40000000
+  static const Color black25 = Color(0x40000000);
+
+  /// Color: #4D000000
+  static const Color black30 = Color(0x4D000000);
+
+  /// Color: #59000000
+  static const Color black35 = Color(0x59000000);
+
+  /// Color: #66000000
+  static const Color black40 = Color(0x66000000);
+
+  /// Color: #73000000
+  static const Color black45 = Color(0x73000000);
+
+  /// Color: #0D000000
+  static const Color black5 = Color(0x0D000000);
+
+  /// Color: #80000000
+  static const Color black50 = Color(0x80000000);
+
+  /// Color: #8C000000
+  static const Color black55 = Color(0x8C000000);
+
+  /// Color: #99000000
+  static const Color black60 = Color(0x99000000);
+
+  /// Color: #A6000000
+  static const Color black65 = Color(0xA6000000);
+
+  /// Color: #B3000000
+  static const Color black70 = Color(0xB3000000);
+
+  /// Color: #B000000F
+  static const Color black75 = Color(0xB000000F);
+
+  /// Color: #CC000000
+  static const Color black80 = Color(0xCC000000);
+
+  /// Color: #D9000000
+  static const Color black85 = Color(0xD9000000);
+
+  /// Color: #E6000000
+  static const Color black90 = Color(0xE6000000);
+
+  /// Color: #F2000000
+  static const Color black95 = Color(0xF2000000);
+
+  /// Color: #6399FF
+  static const Color colorAccentPrimary = Color(0xFF6399FF);
+
+  /// Color: #374BFF
+  static const Color colorPrimary = Color(0xFF374BFF);
+
+  /// Color: #F6FAFF
+  static const Color colorPrimaryLight = Color(0xFFF6FAFF);
+
+  /// Color: #42000000
+  static const Color disabledTextColor = Color(0x42000000);
+
+  /// Color: #FFFFFFFF
+  static const Color inverseTextColor = Color(0xFFFFFFFF);
+
+  /// Color: #66000000
+  static const Color placeholderTextColor = Color(0x66000000);
+
+  /// Color: #E6000000
+  static const Color primaryTextColor = Color(0xE6000000);
+
+  /// Color: #99000000
+  static const Color secondaryTextColor = Color(0x99000000);
+
+  /// Color: #00FFFFFF
+  static const Color transparent = Color(0x00FFFFFF);
+
+  /// Color: #FFFFFFFF
+  static const Color white = Color(0xFFFFFFFF);
+
+  /// Color: #1AFFFFFF
+  static const Color white10 = Color(0x1AFFFFFF);
+
+  /// Color: #26FFFFFF
+  static const Color white15 = Color(0x26FFFFFF);
+
+  /// Color: #33FFFFFF
+  static const Color white20 = Color(0x33FFFFFF);
+
+  /// Color: #40FFFFFF
+  static const Color white25 = Color(0x40FFFFFF);
+
+  /// Color: #4DFFFFFF
+  static const Color white30 = Color(0x4DFFFFFF);
+
+  /// Color: #59FFFFFF
+  static const Color white35 = Color(0x59FFFFFF);
+
+  /// Color: #66FFFFFF
+  static const Color white40 = Color(0x66FFFFFF);
+
+  /// Color: #73FFFFFF
+  static const Color white45 = Color(0x73FFFFFF);
+
+  /// Color: #0DFFFFFF
+  static const Color white5 = Color(0x0DFFFFFF);
+
+  /// Color: #80FFFFFF
+  static const Color white50 = Color(0x80FFFFFF);
+
+  /// Color: #8CFFFFFF
+  static const Color white55 = Color(0x8CFFFFFF);
+
+  /// Color: #99FFFFFF
+  static const Color white60 = Color(0x99FFFFFF);
+
+  /// Color: #A6FFFFFF
+  static const Color white65 = Color(0xA6FFFFFF);
+
+  /// Color: #B3FFFFFF
+  static const Color white70 = Color(0xB3FFFFFF);
+
+  /// Color: #BFFFFFFF
+  static const Color white75 = Color(0xBFFFFFFF);
+
+  /// Color: #CCFFFFFF
+  static const Color white80 = Color(0xCCFFFFFF);
+
+  /// Color: #D9FFFFFF
+  static const Color white85 = Color(0xD9FFFFFF);
+
+  /// Color: #DEFFFFFF
+  static const Color white87 = Color(0xDEFFFFFF);
+
+  /// Color: #E6FFFFFF
+  static const Color white90 = Color(0xE6FFFFFF);
+
+  /// Color: #F2FFFFFF
+  static const Color white95 = Color(0xF2FFFFFF);
+}

+ 33 - 0
lib/resource/string.gen.dart

@@ -0,0 +1,33 @@
+import 'package:get/get.dart';
+
+class StringName {
+  StringName._();
+
+  static final String appName = 'app_name'.tr; // 手机定位追迹
+  static final String mainTabHome = 'main_tab_home'.tr; // 首页
+  static final String mainTabCamera = 'main_tab_camera'.tr; // 扫一扫
+  static final String mainTabMine = 'main_tab_mine'.tr; // 我的
+  static final String loadingMore = 'loading_more'.tr; // 加载更多
+  static final String loadPullUp = 'load_pull_up'.tr; // 上拉加载
+  static final String loadingTxt = 'loading_txt'.tr; // 正在加载
+  static final String loadNoData = 'load_no_data'.tr; // 没有更多数据了
+  static final String loadFailed = 'load_failed'.tr; // 加载失败
+}
+
+class StringMultiSource {
+  StringMultiSource._();
+
+  static const Map<String, Map<String, String>> values = {
+    'zh_CN': {
+      'app_name': '手机定位追迹',
+      'main_tab_home': '首页',
+      'main_tab_camera': '扫一扫',
+      'main_tab_mine': '我的',
+      'loading_more': '加载更多',
+      'load_pull_up': '上拉加载',
+      'loading_txt': '正在加载',
+      'load_no_data': '没有更多数据了',
+      'load_failed': '加载失败',
+    },
+  };
+}

+ 7 - 0
lib/resource/string_source.dart

@@ -0,0 +1,7 @@
+import 'package:get/get.dart';
+import 'package:location/resource/string.gen.dart';
+
+class StringResource extends Translations {
+  @override
+  Map<String, Map<String, String>> get keys => StringMultiSource.values;
+}

+ 32 - 0
lib/router/app_pages.dart

@@ -0,0 +1,32 @@
+import 'package:get/get.dart';
+import 'package:location/module/main/main_page.dart';
+import '../module/main/main_controller.dart';
+import '../module/splash/splash_controller.dart';
+import '../module/splash/splash_page.dart';
+
+abstract class AppPage {
+  static final pages = <GetPage>[...generalPages];
+}
+
+abstract class RoutePath {
+  static const splash = '/';
+
+  static const mainTab = '/mainTab';
+}
+
+class AppBinding extends Bindings {
+  @override
+  void dependencies() {
+    lazyPut(() => SplashController());
+    lazyPut(() => MainController());
+  }
+
+  void lazyPut<S>(InstanceBuilderCallback<S> builder) {
+    Get.lazyPut(builder, fenix: true);
+  }
+}
+
+final generalPages = [
+  GetPage(name: RoutePath.splash, page: () => const SplashPage()),
+  GetPage(name: RoutePath.mainTab, page: () => MainPage()),
+];

+ 812 - 5
pubspec.lock

@@ -1,6 +1,51 @@
 # Generated by pub
 # See https://dart.dev/tools/pub/glossary#lockfile
 packages:
+  _fe_analyzer_shared:
+    dependency: transitive
+    description:
+      name: _fe_analyzer_shared
+      sha256: "16e298750b6d0af7ce8a3ba7c18c69c3785d11b15ec83f6dcd0ad2a0009b3cab"
+      url: "https://pub.dev"
+    source: hosted
+    version: "76.0.0"
+  _macros:
+    dependency: transitive
+    description: dart
+    source: sdk
+    version: "0.3.3"
+  analyzer:
+    dependency: transitive
+    description:
+      name: analyzer
+      sha256: "1f14db053a8c23e260789e9b0980fa27f2680dd640932cae5e1137cce0e46e1e"
+      url: "https://pub.dev"
+    source: hosted
+    version: "6.11.0"
+  android_id:
+    dependency: "direct main"
+    description:
+      name: android_id
+      sha256: "748ba5f93dd5c497e675d8eaa1404346ce4d1794464ea654576ff192d153b92a"
+      url: "https://pub.dev"
+    source: hosted
+    version: "0.4.0"
+  archive:
+    dependency: transitive
+    description:
+      name: archive
+      sha256: "6199c74e3db4fbfbd04f66d739e72fe11c8a8957d5f219f1f4482dbde6420b5a"
+      url: "https://pub.dev"
+    source: hosted
+    version: "4.0.2"
+  args:
+    dependency: transitive
+    description:
+      name: args
+      sha256: bf9f5caeea8d8fe6721a9c358dd8a5c1947b27f1cfaa18b39c301273594919e6
+      url: "https://pub.dev"
+    source: hosted
+    version: "2.6.0"
   async:
     dependency: transitive
     description:
@@ -9,6 +54,22 @@ packages:
       url: "https://pub.dev"
     source: hosted
     version: "2.12.0"
+  atmob_channel_reader:
+    dependency: "direct main"
+    description:
+      name: atmob_channel_reader
+      sha256: e855cd64162fcb37f7f1f5ae9ee71418ba36c2d9f1b4d58e540afb576bab6888
+      url: "http://pub.v8dashen.com"
+    source: hosted
+    version: "0.0.2"
+  atmob_logging:
+    dependency: "direct main"
+    description:
+      name: atmob_logging
+      sha256: f1c07516cda223696ecd4b842038a668740cd25e782845ff10abed1d1bfef7ef
+      url: "http://pub.v8dashen.com"
+    source: hosted
+    version: "0.0.5"
   boolean_selector:
     dependency: transitive
     description:
@@ -17,6 +78,70 @@ packages:
       url: "https://pub.dev"
     source: hosted
     version: "2.1.2"
+  build:
+    dependency: transitive
+    description:
+      name: build
+      sha256: cef23f1eda9b57566c81e2133d196f8e3df48f244b317368d65c5943d91148f0
+      url: "https://pub.dev"
+    source: hosted
+    version: "2.4.2"
+  build_config:
+    dependency: transitive
+    description:
+      name: build_config
+      sha256: "4ae2de3e1e67ea270081eaee972e1bd8f027d459f249e0f1186730784c2e7e33"
+      url: "https://pub.dev"
+    source: hosted
+    version: "1.1.2"
+  build_daemon:
+    dependency: transitive
+    description:
+      name: build_daemon
+      sha256: "8e928697a82be082206edb0b9c99c5a4ad6bc31c9e9b8b2f291ae65cd4a25daa"
+      url: "https://pub.dev"
+    source: hosted
+    version: "4.0.4"
+  build_resolvers:
+    dependency: transitive
+    description:
+      name: build_resolvers
+      sha256: b9e4fda21d846e192628e7a4f6deda6888c36b5b69ba02ff291a01fd529140f0
+      url: "https://pub.dev"
+    source: hosted
+    version: "2.4.4"
+  build_runner:
+    dependency: "direct dev"
+    description:
+      name: build_runner
+      sha256: "028819cfb90051c6b5440c7e574d1896f8037e3c96cf17aaeb054c9311cfbf4d"
+      url: "https://pub.dev"
+    source: hosted
+    version: "2.4.13"
+  build_runner_core:
+    dependency: transitive
+    description:
+      name: build_runner_core
+      sha256: f8126682b87a7282a339b871298cc12009cb67109cfa1614d6436fb0289193e0
+      url: "https://pub.dev"
+    source: hosted
+    version: "7.3.2"
+  built_collection:
+    dependency: transitive
+    description:
+      name: built_collection
+      sha256: "376e3dd27b51ea877c28d525560790aee2e6fbb5f20e2f85d5081027d94e2100"
+      url: "https://pub.dev"
+    source: hosted
+    version: "5.1.1"
+  built_value:
+    dependency: transitive
+    description:
+      name: built_value
+      sha256: "28a712df2576b63c6c005c465989a348604960c0958d28be5303ba9baa841ac2"
+      url: "https://pub.dev"
+    source: hosted
+    version: "8.9.3"
   characters:
     dependency: transitive
     description:
@@ -25,6 +150,14 @@ packages:
       url: "https://pub.dev"
     source: hosted
     version: "1.4.0"
+  checked_yaml:
+    dependency: transitive
+    description:
+      name: checked_yaml
+      sha256: feb6bed21949061731a7a75fc5d2aa727cf160b91af9a3e464c5e3a32e28b5ff
+      url: "https://pub.dev"
+    source: hosted
+    version: "2.0.3"
   clock:
     dependency: transitive
     description:
@@ -33,6 +166,14 @@ packages:
       url: "https://pub.dev"
     source: hosted
     version: "1.1.2"
+  code_builder:
+    dependency: transitive
+    description:
+      name: code_builder
+      sha256: "0ec10bf4a89e4c613960bf1e8b42c64127021740fb21640c29c909826a5eea3e"
+      url: "https://pub.dev"
+    source: hosted
+    version: "4.10.1"
   collection:
     dependency: transitive
     description:
@@ -41,14 +182,78 @@ packages:
       url: "https://pub.dev"
     source: hosted
     version: "1.19.1"
-  cupertino_icons:
+  color:
+    dependency: transitive
+    description:
+      name: color
+      sha256: ddcdf1b3badd7008233f5acffaf20ca9f5dc2cd0172b75f68f24526a5f5725cb
+      url: "https://pub.dev"
+    source: hosted
+    version: "3.0.0"
+  convert:
+    dependency: transitive
+    description:
+      name: convert
+      sha256: b30acd5944035672bc15c6b7a8b47d773e41e2f17de064350988c5d02adb1c68
+      url: "https://pub.dev"
+    source: hosted
+    version: "3.1.2"
+  crypto:
+    dependency: transitive
+    description:
+      name: crypto
+      sha256: "1e445881f28f22d6140f181e07737b22f1e099a5e1ff94b0af2f9e4a463f4855"
+      url: "https://pub.dev"
+    source: hosted
+    version: "3.0.6"
+  dart_style:
+    dependency: transitive
+    description:
+      name: dart_style
+      sha256: "7306ab8a2359a48d22310ad823521d723acfed60ee1f7e37388e8986853b6820"
+      url: "https://pub.dev"
+    source: hosted
+    version: "2.3.8"
+  dartx:
+    dependency: transitive
+    description:
+      name: dartx
+      sha256: "8b25435617027257d43e6508b5fe061012880ddfdaa75a71d607c3de2a13d244"
+      url: "https://pub.dev"
+    source: hosted
+    version: "1.2.0"
+  device_info_plus:
     dependency: "direct main"
     description:
-      name: cupertino_icons
-      sha256: ba631d1c7f7bef6b729a622b7b752645a2d076dba9976925b8f25725a30e1ee6
+      name: device_info_plus
+      sha256: a7fd703482b391a87d60b6061d04dfdeab07826b96f9abd8f5ed98068acc0074
       url: "https://pub.dev"
     source: hosted
-    version: "1.0.8"
+    version: "10.1.2"
+  device_info_plus_platform_interface:
+    dependency: transitive
+    description:
+      name: device_info_plus_platform_interface
+      sha256: "0b04e02b30791224b31969eb1b50d723498f402971bff3630bca2ba839bd1ed2"
+      url: "https://pub.dev"
+    source: hosted
+    version: "7.0.2"
+  dio:
+    dependency: "direct main"
+    description:
+      name: dio
+      sha256: "5598aa796bbf4699afd5c67c0f5f6e2ed542afc956884b9cd58c306966efc260"
+      url: "https://pub.dev"
+    source: hosted
+    version: "5.7.0"
+  dio_web_adapter:
+    dependency: transitive
+    description:
+      name: dio_web_adapter
+      sha256: "33259a9276d6cea88774a0000cfae0d861003497755969c92faa223108620dc8"
+      url: "https://pub.dev"
+    source: hosted
+    version: "2.0.0"
   fake_async:
     dependency: transitive
     description:
@@ -57,11 +262,51 @@ packages:
       url: "https://pub.dev"
     source: hosted
     version: "1.3.2"
+  ffi:
+    dependency: transitive
+    description:
+      name: ffi
+      sha256: "289279317b4b16eb2bb7e271abccd4bf84ec9bdcbe999e278a94b804f5630418"
+      url: "https://pub.dev"
+    source: hosted
+    version: "2.1.4"
+  file:
+    dependency: transitive
+    description:
+      name: file
+      sha256: a3b4f84adafef897088c160faf7dfffb7696046cb13ae90b508c2cbc95d3b8d4
+      url: "https://pub.dev"
+    source: hosted
+    version: "7.0.1"
+  fixnum:
+    dependency: transitive
+    description:
+      name: fixnum
+      sha256: b6dc7065e46c974bc7c5f143080a6764ec7a4be6da1285ececdc37be96de53be
+      url: "https://pub.dev"
+    source: hosted
+    version: "1.1.1"
   flutter:
     dependency: "direct main"
     description: flutter
     source: sdk
     version: "0.0.0"
+  flutter_gen_core:
+    dependency: transitive
+    description:
+      name: flutter_gen_core
+      sha256: "53890b653738f34363d9f0d40f82104c261716bd551d3ba65f648770b6764c21"
+      url: "https://pub.dev"
+    source: hosted
+    version: "5.9.0"
+  flutter_gen_runner:
+    dependency: "direct dev"
+    description:
+      name: flutter_gen_runner
+      sha256: de70b42eb5329f712c8b041069d081ad5fb5109f32d6d1ea9c1b39596786215d
+      url: "https://pub.dev"
+    source: hosted
+    version: "5.9.0"
   flutter_lints:
     dependency: "direct dev"
     description:
@@ -70,11 +315,149 @@ packages:
       url: "https://pub.dev"
     source: hosted
     version: "5.0.0"
+  flutter_localizations:
+    dependency: "direct main"
+    description: flutter
+    source: sdk
+    version: "0.0.0"
+  flutter_screenutil:
+    dependency: "direct main"
+    description:
+      name: flutter_screenutil
+      sha256: "8239210dd68bee6b0577aa4a090890342d04a136ce1c81f98ee513fc0ce891de"
+      url: "https://pub.dev"
+    source: hosted
+    version: "5.9.3"
+  flutter_smart_dialog:
+    dependency: "direct main"
+    description:
+      name: flutter_smart_dialog
+      sha256: "3d376ba47f64391cc657f706815b32dd6ff2e0f80553a5c9f33b812ba7c59462"
+      url: "https://pub.dev"
+    source: hosted
+    version: "4.9.8"
   flutter_test:
     dependency: "direct dev"
     description: flutter
     source: sdk
     version: "0.0.0"
+  flutter_web_plugins:
+    dependency: transitive
+    description: flutter
+    source: sdk
+    version: "0.0.0"
+  frontend_server_client:
+    dependency: transitive
+    description:
+      name: frontend_server_client
+      sha256: f64a0333a82f30b0cca061bc3d143813a486dc086b574bfb233b7c1372427694
+      url: "https://pub.dev"
+    source: hosted
+    version: "4.0.0"
+  get:
+    dependency: "direct main"
+    description:
+      name: get
+      sha256: c79eeb4339f1f3deffd9ec912f8a923834bec55f7b49c9e882b8fef2c139d425
+      url: "https://pub.dev"
+    source: hosted
+    version: "4.7.2"
+  glob:
+    dependency: transitive
+    description:
+      name: glob
+      sha256: c3f1ee72c96f8f78935e18aa8cecced9ab132419e8625dc187e1c2408efc20de
+      url: "https://pub.dev"
+    source: hosted
+    version: "2.1.3"
+  graphs:
+    dependency: transitive
+    description:
+      name: graphs
+      sha256: "741bbf84165310a68ff28fe9e727332eef1407342fca52759cb21ad8177bb8d0"
+      url: "https://pub.dev"
+    source: hosted
+    version: "2.3.2"
+  hashcodes:
+    dependency: transitive
+    description:
+      name: hashcodes
+      sha256: "80f9410a5b3c8e110c4b7604546034749259f5d6dcca63e0d3c17c9258f1a651"
+      url: "https://pub.dev"
+    source: hosted
+    version: "2.0.0"
+  http:
+    dependency: transitive
+    description:
+      name: http
+      sha256: fe7ab022b76f3034adc518fb6ea04a82387620e19977665ea18d30a1cf43442f
+      url: "https://pub.dev"
+    source: hosted
+    version: "1.3.0"
+  http_multi_server:
+    dependency: transitive
+    description:
+      name: http_multi_server
+      sha256: aa6199f908078bb1c5efb8d8638d4ae191aac11b311132c3ef48ce352fb52ef8
+      url: "https://pub.dev"
+    source: hosted
+    version: "3.2.2"
+  http_parser:
+    dependency: transitive
+    description:
+      name: http_parser
+      sha256: "178d74305e7866013777bab2c3d8726205dc5a4dd935297175b19a23a2e66571"
+      url: "https://pub.dev"
+    source: hosted
+    version: "4.1.2"
+  image_size_getter:
+    dependency: transitive
+    description:
+      name: image_size_getter
+      sha256: "9a299e3af2ebbcfd1baf21456c3c884037ff524316c97d8e56035ea8fdf35653"
+      url: "https://pub.dev"
+    source: hosted
+    version: "2.4.0"
+  intl:
+    dependency: transitive
+    description:
+      name: intl
+      sha256: d6f56758b7d3014a48af9701c085700aac781a92a87a62b1333b46d8879661cf
+      url: "https://pub.dev"
+    source: hosted
+    version: "0.19.0"
+  io:
+    dependency: transitive
+    description:
+      name: io
+      sha256: dfd5a80599cf0165756e3181807ed3e77daf6dd4137caaad72d0b7931597650b
+      url: "https://pub.dev"
+    source: hosted
+    version: "1.0.5"
+  js:
+    dependency: transitive
+    description:
+      name: js
+      sha256: "53385261521cc4a0c4658fd0ad07a7d14591cf8fc33abbceae306ddb974888dc"
+      url: "https://pub.dev"
+    source: hosted
+    version: "0.7.2"
+  json_annotation:
+    dependency: "direct main"
+    description:
+      name: json_annotation
+      sha256: "1ce844379ca14835a50d2f019a3099f419082cfdd231cd86a142af94dd5c6bb1"
+      url: "https://pub.dev"
+    source: hosted
+    version: "4.9.0"
+  json_serializable:
+    dependency: "direct dev"
+    description:
+      name: json_serializable
+      sha256: c2fcb3920cf2b6ae6845954186420fca40bc0a8abcc84903b7801f17d7050d7c
+      url: "https://pub.dev"
+    source: hosted
+    version: "6.9.0"
   leak_tracker:
     dependency: transitive
     description:
@@ -107,6 +490,22 @@ packages:
       url: "https://pub.dev"
     source: hosted
     version: "5.1.1"
+  logging:
+    dependency: transitive
+    description:
+      name: logging
+      sha256: c8245ada5f1717ed44271ed1c26b8ce85ca3228fd2ffdb75468ab01979309d61
+      url: "https://pub.dev"
+    source: hosted
+    version: "1.3.0"
+  macros:
+    dependency: transitive
+    description:
+      name: macros
+      sha256: "1d9e801cd66f7ea3663c45fc708450db1fa57f988142c64289142c9b7ee80656"
+      url: "https://pub.dev"
+    source: hosted
+    version: "0.1.3-main.0"
   matcher:
     dependency: transitive
     description:
@@ -131,6 +530,78 @@ packages:
       url: "https://pub.dev"
     source: hosted
     version: "1.16.0"
+  mime:
+    dependency: transitive
+    description:
+      name: mime
+      sha256: "41a20518f0cb1256669420fdba0cd90d21561e560ac240f26ef8322e45bb7ed6"
+      url: "https://pub.dev"
+    source: hosted
+    version: "2.0.0"
+  mmkv:
+    dependency: "direct main"
+    description:
+      name: mmkv
+      sha256: f725842c2dc07f6d30e944611c8a12e0def07c5b1eaf7a5e5f6e2c24b1678d00
+      url: "https://pub.dev"
+    source: hosted
+    version: "2.0.2"
+  mmkv_android:
+    dependency: transitive
+    description:
+      name: mmkv_android
+      sha256: aa4521073e635367e9dc26548b606879dd4cb00391d755fd4fd9681e23a79caa
+      url: "https://pub.dev"
+    source: hosted
+    version: "2.0.0"
+  mmkv_ios:
+    dependency: transitive
+    description:
+      name: mmkv_ios
+      sha256: ff8c14134d22f79ca067fa24ebb7d5df1aadb7875c00e9e715befae4bf8e46d9
+      url: "https://pub.dev"
+    source: hosted
+    version: "2.0.0"
+  mmkv_ohos:
+    dependency: transitive
+    description:
+      name: mmkv_ohos
+      sha256: d263180e82b2508d05ab9df31fd5236c81b257246d9c5f5b9c73e1a4a532ea3b
+      url: "https://pub.dev"
+    source: hosted
+    version: "2.0.2"
+  mmkv_platform_interface:
+    dependency: transitive
+    description:
+      name: mmkv_platform_interface
+      sha256: "5980cf939c065c8dec2fc051e49d98e4afcc16bc1a6bbc96f9614814fd540c43"
+      url: "https://pub.dev"
+    source: hosted
+    version: "2.0.0"
+  package_config:
+    dependency: transitive
+    description:
+      name: package_config
+      sha256: "92d4488434b520a62570293fbd33bb556c7d49230791c1b4bbd973baf6d2dc67"
+      url: "https://pub.dev"
+    source: hosted
+    version: "2.1.1"
+  package_info_plus:
+    dependency: "direct main"
+    description:
+      name: package_info_plus
+      sha256: da8d9ac8c4b1df253d1a328b7bf01ae77ef132833479ab40763334db13b91cce
+      url: "https://pub.dev"
+    source: hosted
+    version: "8.1.1"
+  package_info_plus_platform_interface:
+    dependency: transitive
+    description:
+      name: package_info_plus_platform_interface
+      sha256: "205ec83335c2ab9107bbba3f8997f9356d72ca3c715d2f038fc773d0366b4c76"
+      url: "https://pub.dev"
+    source: hosted
+    version: "3.1.0"
   path:
     dependency: transitive
     description:
@@ -139,11 +610,227 @@ packages:
       url: "https://pub.dev"
     source: hosted
     version: "1.9.1"
+  path_parsing:
+    dependency: transitive
+    description:
+      name: path_parsing
+      sha256: "883402936929eac138ee0a45da5b0f2c80f89913e6dc3bf77eb65b84b409c6ca"
+      url: "https://pub.dev"
+    source: hosted
+    version: "1.1.0"
+  path_provider:
+    dependency: transitive
+    description:
+      name: path_provider
+      sha256: "50c5dd5b6e1aaf6fb3a78b33f6aa3afca52bf903a8a5298f53101fdaee55bbcd"
+      url: "https://pub.dev"
+    source: hosted
+    version: "2.1.5"
+  path_provider_android:
+    dependency: transitive
+    description:
+      name: path_provider_android
+      sha256: "4adf4fd5423ec60a29506c76581bc05854c55e3a0b72d35bb28d661c9686edf2"
+      url: "https://pub.dev"
+    source: hosted
+    version: "2.2.15"
+  path_provider_foundation:
+    dependency: transitive
+    description:
+      name: path_provider_foundation
+      sha256: "4843174df4d288f5e29185bd6e72a6fbdf5a4a4602717eed565497429f179942"
+      url: "https://pub.dev"
+    source: hosted
+    version: "2.4.1"
+  path_provider_linux:
+    dependency: transitive
+    description:
+      name: path_provider_linux
+      sha256: f7a1fe3a634fe7734c8d3f2766ad746ae2a2884abe22e241a8b301bf5cac3279
+      url: "https://pub.dev"
+    source: hosted
+    version: "2.2.1"
+  path_provider_platform_interface:
+    dependency: transitive
+    description:
+      name: path_provider_platform_interface
+      sha256: "88f5779f72ba699763fa3a3b06aa4bf6de76c8e5de842cf6f29e2e06476c2334"
+      url: "https://pub.dev"
+    source: hosted
+    version: "2.1.2"
+  path_provider_windows:
+    dependency: transitive
+    description:
+      name: path_provider_windows
+      sha256: bd6f00dbd873bfb70d0761682da2b3a2c2fccc2b9e84c495821639601d81afe7
+      url: "https://pub.dev"
+    source: hosted
+    version: "2.3.0"
+  permission_handler:
+    dependency: "direct main"
+    description:
+      name: permission_handler
+      sha256: "18bf33f7fefbd812f37e72091a15575e72d5318854877e0e4035a24ac1113ecb"
+      url: "https://pub.dev"
+    source: hosted
+    version: "11.3.1"
+  permission_handler_android:
+    dependency: transitive
+    description:
+      name: permission_handler_android
+      sha256: d3971dcdd76182a0c198c096b5db2f0884b0d4196723d21a866fc4cdea057ebc
+      url: "https://pub.dev"
+    source: hosted
+    version: "12.1.0"
+  permission_handler_apple:
+    dependency: transitive
+    description:
+      name: permission_handler_apple
+      sha256: f84a188e79a35c687c132a0a0556c254747a08561e99ab933f12f6ca71ef3c98
+      url: "https://pub.dev"
+    source: hosted
+    version: "9.4.6"
+  permission_handler_html:
+    dependency: transitive
+    description:
+      name: permission_handler_html
+      sha256: "38f000e83355abb3392140f6bc3030660cfaef189e1f87824facb76300b4ff24"
+      url: "https://pub.dev"
+    source: hosted
+    version: "0.1.3+5"
+  permission_handler_platform_interface:
+    dependency: transitive
+    description:
+      name: permission_handler_platform_interface
+      sha256: eb99b295153abce5d683cac8c02e22faab63e50679b937fa1bf67d58bb282878
+      url: "https://pub.dev"
+    source: hosted
+    version: "4.3.0"
+  permission_handler_windows:
+    dependency: transitive
+    description:
+      name: permission_handler_windows
+      sha256: "1a790728016f79a41216d88672dbc5df30e686e811ad4e698bfc51f76ad91f1e"
+      url: "https://pub.dev"
+    source: hosted
+    version: "0.2.1"
+  petitparser:
+    dependency: transitive
+    description:
+      name: petitparser
+      sha256: "07c8f0b1913bcde1ff0d26e57ace2f3012ccbf2b204e070290dad3bb22797646"
+      url: "https://pub.dev"
+    source: hosted
+    version: "6.1.0"
+  platform:
+    dependency: transitive
+    description:
+      name: platform
+      sha256: "5d6b1b0036a5f331ebc77c850ebc8506cbc1e9416c27e59b439f917a902a4984"
+      url: "https://pub.dev"
+    source: hosted
+    version: "3.1.6"
+  plugin_platform_interface:
+    dependency: transitive
+    description:
+      name: plugin_platform_interface
+      sha256: "4820fbfdb9478b1ebae27888254d445073732dae3d6ea81f0b7e06d5dedc3f02"
+      url: "https://pub.dev"
+    source: hosted
+    version: "2.1.8"
+  pool:
+    dependency: transitive
+    description:
+      name: pool
+      sha256: "20fe868b6314b322ea036ba325e6fc0711a22948856475e2c2b6306e8ab39c2a"
+      url: "https://pub.dev"
+    source: hosted
+    version: "1.5.1"
+  posix:
+    dependency: transitive
+    description:
+      name: posix
+      sha256: a0117dc2167805aa9125b82eee515cc891819bac2f538c83646d355b16f58b9a
+      url: "https://pub.dev"
+    source: hosted
+    version: "6.0.1"
+  pretty_dio_logger:
+    dependency: "direct main"
+    description:
+      name: pretty_dio_logger
+      sha256: "36f2101299786d567869493e2f5731de61ce130faa14679473b26905a92b6407"
+      url: "https://pub.dev"
+    source: hosted
+    version: "1.4.0"
+  pub_semver:
+    dependency: transitive
+    description:
+      name: pub_semver
+      sha256: "7b3cfbf654f3edd0c6298ecd5be782ce997ddf0e00531b9464b55245185bbbbd"
+      url: "https://pub.dev"
+    source: hosted
+    version: "2.1.5"
+  pubspec_parse:
+    dependency: transitive
+    description:
+      name: pubspec_parse
+      sha256: "0560ba233314abbed0a48a2956f7f022cce7c3e1e73df540277da7544cad4082"
+      url: "https://pub.dev"
+    source: hosted
+    version: "1.5.0"
+  pull_to_refresh:
+    dependency: "direct main"
+    description:
+      name: pull_to_refresh
+      sha256: bbadd5a931837b57739cf08736bea63167e284e71fb23b218c8c9a6e042aad12
+      url: "https://pub.dev"
+    source: hosted
+    version: "2.0.0"
+  retrofit:
+    dependency: "direct main"
+    description:
+      name: retrofit
+      sha256: "3c9885ef3dbc5dc4b3fb0a40c972ab52e4dad04d52dac9bba24dfa76cf100451"
+      url: "https://pub.dev"
+    source: hosted
+    version: "4.4.1"
+  shelf:
+    dependency: transitive
+    description:
+      name: shelf
+      sha256: e7dd780a7ffb623c57850b33f43309312fc863fb6aa3d276a754bb299839ef12
+      url: "https://pub.dev"
+    source: hosted
+    version: "1.4.2"
+  shelf_web_socket:
+    dependency: transitive
+    description:
+      name: shelf_web_socket
+      sha256: cc36c297b52866d203dbf9332263c94becc2fe0ceaa9681d07b6ef9807023b67
+      url: "https://pub.dev"
+    source: hosted
+    version: "2.0.1"
   sky_engine:
     dependency: transitive
     description: flutter
     source: sdk
     version: "0.0.0"
+  source_gen:
+    dependency: transitive
+    description:
+      name: source_gen
+      sha256: "14658ba5f669685cd3d63701d01b31ea748310f7ab854e471962670abcf57832"
+      url: "https://pub.dev"
+    source: hosted
+    version: "1.5.0"
+  source_helper:
+    dependency: transitive
+    description:
+      name: source_helper
+      sha256: "86d247119aedce8e63f4751bd9626fc9613255935558447569ad42f9f5b48b3c"
+      url: "https://pub.dev"
+    source: hosted
+    version: "1.3.5"
   source_span:
     dependency: transitive
     description:
@@ -168,6 +855,14 @@ packages:
       url: "https://pub.dev"
     source: hosted
     version: "2.1.4"
+  stream_transform:
+    dependency: transitive
+    description:
+      name: stream_transform
+      sha256: ad47125e588cfd37a9a7f86c7d6356dde8dfe89d071d293f80ca9e9273a33871
+      url: "https://pub.dev"
+    source: hosted
+    version: "2.1.1"
   string_scanner:
     dependency: transitive
     description:
@@ -192,6 +887,46 @@ packages:
       url: "https://pub.dev"
     source: hosted
     version: "0.7.4"
+  time:
+    dependency: transitive
+    description:
+      name: time
+      sha256: "370572cf5d1e58adcb3e354c47515da3f7469dac3a95b447117e728e7be6f461"
+      url: "https://pub.dev"
+    source: hosted
+    version: "2.1.5"
+  timing:
+    dependency: transitive
+    description:
+      name: timing
+      sha256: "62ee18aca144e4a9f29d212f5a4c6a053be252b895ab14b5821996cff4ed90fe"
+      url: "https://pub.dev"
+    source: hosted
+    version: "1.0.2"
+  typed_data:
+    dependency: transitive
+    description:
+      name: typed_data
+      sha256: f9049c039ebfeb4cf7a7104a675823cd72dba8297f264b6637062516699fa006
+      url: "https://pub.dev"
+    source: hosted
+    version: "1.4.0"
+  vector_graphics_codec:
+    dependency: transitive
+    description:
+      name: vector_graphics_codec
+      sha256: "99fd9fbd34d9f9a32efd7b6a6aae14125d8237b10403b422a6a6dfeac2806146"
+      url: "https://pub.dev"
+    source: hosted
+    version: "1.1.13"
+  vector_graphics_compiler:
+    dependency: transitive
+    description:
+      name: vector_graphics_compiler
+      sha256: "1b4b9e706a10294258727674a340ae0d6e64a7231980f9f9a3d12e4b42407aad"
+      url: "https://pub.dev"
+    source: hosted
+    version: "1.1.16"
   vector_math:
     dependency: transitive
     description:
@@ -208,6 +943,78 @@ packages:
       url: "https://pub.dev"
     source: hosted
     version: "14.3.1"
+  watcher:
+    dependency: transitive
+    description:
+      name: watcher
+      sha256: "69da27e49efa56a15f8afe8f4438c4ec02eff0a117df1b22ea4aad194fe1c104"
+      url: "https://pub.dev"
+    source: hosted
+    version: "1.1.1"
+  web:
+    dependency: transitive
+    description:
+      name: web
+      sha256: cd3543bd5798f6ad290ea73d210f423502e71900302dde696f8bff84bf89a1cb
+      url: "https://pub.dev"
+    source: hosted
+    version: "1.1.0"
+  web_socket:
+    dependency: transitive
+    description:
+      name: web_socket
+      sha256: "3c12d96c0c9a4eec095246debcea7b86c0324f22df69893d538fcc6f1b8cce83"
+      url: "https://pub.dev"
+    source: hosted
+    version: "0.1.6"
+  web_socket_channel:
+    dependency: transitive
+    description:
+      name: web_socket_channel
+      sha256: "0b8e2457400d8a859b7b2030786835a28a8e80836ef64402abef392ff4f1d0e5"
+      url: "https://pub.dev"
+    source: hosted
+    version: "3.0.2"
+  win32:
+    dependency: transitive
+    description:
+      name: win32
+      sha256: b89e6e24d1454e149ab20fbb225af58660f0c0bf4475544650700d8e2da54aef
+      url: "https://pub.dev"
+    source: hosted
+    version: "5.11.0"
+  win32_registry:
+    dependency: transitive
+    description:
+      name: win32_registry
+      sha256: "21ec76dfc731550fd3e2ce7a33a9ea90b828fdf19a5c3bcf556fa992cfa99852"
+      url: "https://pub.dev"
+    source: hosted
+    version: "1.1.5"
+  xdg_directories:
+    dependency: transitive
+    description:
+      name: xdg_directories
+      sha256: "7a3f37b05d989967cdddcbb571f1ea834867ae2faa29725fd085180e0883aa15"
+      url: "https://pub.dev"
+    source: hosted
+    version: "1.1.0"
+  xml:
+    dependency: transitive
+    description:
+      name: xml
+      sha256: b015a8ad1c488f66851d762d3090a21c600e479dc75e68328c52774040cf9226
+      url: "https://pub.dev"
+    source: hosted
+    version: "6.5.0"
+  yaml:
+    dependency: transitive
+    description:
+      name: yaml
+      sha256: b9da305ac7c39faa3f030eccd175340f968459dae4af175130b3fc47e40d76ce
+      url: "https://pub.dev"
+    source: hosted
+    version: "3.1.3"
 sdks:
   dart: ">=3.7.0 <4.0.0"
-  flutter: ">=3.18.0-18.0.pre.54"
+  flutter: ">=3.24.0"

+ 69 - 27
pubspec.yaml

@@ -31,21 +31,80 @@ dependencies:
   flutter:
     sdk: flutter
 
-  # The following adds the Cupertino Icons font to your application.
-  # Use with the CupertinoIcons class for iOS style icons.
-  cupertino_icons: ^1.0.8
+    # 状态管理
+  get: 4.7.2
+
+  # 网络
+  dio: 5.7.0
+  pretty_dio_logger: 1.4.0
+  retrofit: 4.4.1
+  json_annotation: 4.9.0
+
+  #获取设备信息
+  device_info_plus: 10.1.2
+  android_id: 0.4.0
+
+  # 包信息
+  package_info_plus: 8.1.1
+
+  # 屏幕适配
+  flutter_screenutil: 5.9.3
+
+  # 弹窗
+  flutter_smart_dialog: 4.9.8
+
+  #数据存储
+  mmkv: 2.0.2
+
+  #权限申请
+  permission_handler: 11.3.1
+
+  #上、下拉刷新
+  pull_to_refresh: ^2.0.0
+
+  #本地化
+  flutter_localizations:
+    sdk: flutter
+
+  #日志打印
+  atmob_logging:
+    version: ^0.0.5
+    hosted:
+      name: atmob_logging
+      url: http://pub.v8dashen.com/
+
+  #渠道包信息
+  atmob_channel_reader:
+    version: ^0.0.2
+    hosted:
+      name: atmob_channel_reader
+      url: http://pub.v8dashen.com/
 
 dev_dependencies:
   flutter_test:
     sdk: flutter
 
-  # The "flutter_lints" package below contains a set of recommended lints to
-  # encourage good coding practices. The lint set provided by the package is
-  # activated in the `analysis_options.yaml` file located at the root of your
-  # package. See that file for information about deactivating specific lint
-  # rules and activating additional ones.
+
+  build_runner: 2.4.13
+
+  json_serializable: 6.9.0
+
+  flutter_gen_runner: 5.9.0
+
   flutter_lints: ^5.0.0
 
+
+#----------gen配置---------------
+flutter_gen:
+  output: lib/resource/
+  colors:
+    inputs:
+      - assets/color/common_color.xml
+      - assets/color/color.xml
+#----------gen配置---------------
+
+
+
 # For information on the generic Dart part of this file, see the
 # following page: https://dart.dev/tools/pub/pubspec
 
@@ -68,22 +127,5 @@ flutter:
   # For details regarding adding assets from package dependencies, see
   # https://flutter.dev/to/asset-from-package
 
-  # To add custom fonts to your application, add a fonts section here,
-  # in this "flutter" section. Each entry in this list should have a
-  # "family" key with the font family name, and a "fonts" key with a
-  # list giving the asset and other descriptors for the font. For
-  # example:
-  # fonts:
-  #   - family: Schyler
-  #     fonts:
-  #       - asset: fonts/Schyler-Regular.ttf
-  #       - asset: fonts/Schyler-Italic.ttf
-  #         style: italic
-  #   - family: Trajan Pro
-  #     fonts:
-  #       - asset: fonts/TrajanPro.ttf
-  #       - asset: fonts/TrajanPro_Bold.ttf
-  #         weight: 700
-  #
-  # For details regarding fonts from package dependencies,
-  # see https://flutter.dev/to/font-from-package
+  assets:
+    - assets/images/

+ 115 - 0
string_resource_builder.dart

@@ -0,0 +1,115 @@
+import 'dart:async';
+import 'dart:io';
+import 'package:build/build.dart';
+import 'package:xml/xml.dart';
+
+const baseType = 'zh_CN';
+
+Builder builds(BuilderOptions options) => StringResourceBuilder();
+
+class StringResourceBuilder implements Builder {
+  @override
+  Future<void> build(BuildStep buildStep) async {
+    generateStringResources();
+  }
+
+  @override
+  Map<String, List<String>> get buildExtensions => {
+    '.xml': ['.s.dart'],
+  };
+}
+
+void main() {
+  generateStringResources();
+}
+
+void generateStringResources() {
+  print('generateStringResources...start');
+  final directory = Directory('assets/string/');
+
+  final buffer = StringBuffer();
+  final multiBuffer = StringBuffer();
+  buffer.writeln('import \'package:get/get.dart\';');
+  buffer.writeln();
+  buffer.writeln('class StringName {');
+  buffer.writeln('StringName._();');
+
+  multiBuffer.writeln('class StringMultiSource {');
+  multiBuffer.writeln('StringMultiSource._();');
+  multiBuffer.writeln(
+    '  static const Map<String, Map<String, String>> values = {',
+  );
+  directory.listSync(recursive: true).forEach((element) {
+    if (element is Directory) {
+      final files = element.listSync().where(
+        (file) => file.path.endsWith('.xml'),
+      );
+      bool isBase = element.path.endsWith('base');
+      String node = isBase ? baseType : element.path.split('/').last;
+      for (var file in files) {
+        final content = File(file.path).readAsStringSync();
+        final document = XmlDocument.parse(content);
+        final strings = document.findAllElements('string');
+        multiBuffer.writeln('    \'$node\': {');
+        for (var string in strings) {
+          final name = string.getAttribute('name');
+          String value = processXmlText(string.text);
+          if (isBase) {
+            final camelCaseName = toCamelCase(name);
+            buffer.writeln(
+              '  static final String $camelCaseName = \'$name\'.tr;// $value',
+            );
+          }
+          multiBuffer.writeln('      \'$name\': \'$value\',');
+        }
+        multiBuffer.writeln('    },');
+      }
+    }
+  });
+
+  multiBuffer.writeln('  };');
+  multiBuffer.writeln('}');
+
+  buffer.writeln('}');
+  buffer.writeln();
+  buffer.writeln(multiBuffer.toString());
+
+  createDirectory('lib/resource');
+  final outputFile = File('lib/resource/string.gen.dart');
+  outputFile.writeAsStringSync(buffer.toString());
+
+  print('Strings file generated successfully!');
+}
+
+String processXmlText(String original) {
+  return original
+      .replaceAll('\r\n', ' ')
+      .replaceAll('\n', ' ')
+      .replaceAll(RegExp(r'\s+'), ' ')
+      .trim()
+      .replaceAll("'", "\\'");
+}
+
+void createDirectory(String path) {
+  final directory = Directory(path);
+  if (!directory.existsSync()) {
+    directory.createSync(recursive: true);
+    print('Directory created: $path');
+  }
+}
+
+String toCamelCase(String? snakeCase) {
+  if (snakeCase == null) {
+    return '';
+  }
+  return snakeCase
+      .split('_')
+      .map((word) {
+        if (word == snakeCase.split('_').first) {
+          return word;
+        } else {
+          return word[0].toUpperCase() + word.substring(1);
+        }
+      })
+      .join('');
+}