소스 검색

code base

AtlantisMace 1 년 전
부모
커밋
0e9d2af6bc
9개의 변경된 파일1282개의 추가작업 그리고 88개의 파일을 삭제
  1. 94 88
      .gitignore
  2. 6 0
      lib/appfx.dart
  3. 25 0
      lib/store/appStoreBase.dart
  4. 49 0
      lib/store/dbMgrBase.dart
  5. 223 0
      lib/util/hexUtils.dart
  6. 37 0
      lib/util/logger.dart
  7. 56 0
      lib/util/tools.dart
  8. 768 0
      pubspec.lock
  9. 24 0
      pubspec.yaml

+ 94 - 88
.gitignore

@@ -1,89 +1,95 @@
-# ---> Dart
-# Don’t commit the following directories created by pub.
-.buildlog
-.pub/
-build/
-packages
-.packages
-
-# Or the files created by dart2js.
-*.dart.js
-*.js_
-*.js.deps
-*.js.map
-
-# Include when developing application packages.
-pubspec.lock
-
-# ---> macOS
+# OSX
+#
 .DS_Store
-.AppleDouble
-.LSOverride
-
-# Icon must end with two \r
-Icon
-
-
-# Thumbnails
-._*
-
-# Files that might appear in the root of a volume
-.DocumentRevisions-V100
-.fseventsd
-.Spotlight-V100
-.TemporaryItems
-.Trashes
-.VolumeIcon.icns
-
-# Directories potentially created on remote AFP share
-.AppleDB
-.AppleDesktop
-Network Trash Folder
-Temporary Items
-.apdisk
-
-# ---> Windows
-# Windows image file caches
-Thumbs.db
-ehthumbs.db
-
-# Folder config file
-Desktop.ini
-
-# Recycle Bin used on file shares
-$RECYCLE.BIN/
-
-# Windows Installer files
-*.cab
-*.msi
-*.msm
-*.msp
-
-# Windows shortcuts
-*.lnk
-
-# ---> Xcode
-# Xcode
-#
-# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore
-
-## Build generated
-build/
-DerivedData
-
-## Various settings
-*.pbxuser
-!default.pbxuser
-*.mode1v3
-!default.mode1v3
-*.mode2v3
-!default.mode2v3
-*.perspectivev3
-!default.perspectivev3
-xcuserdata
-
-## Other
-*.xccheckout
-*.moved-aside
-*.xcuserstate
-
+
+# Xcode
+#
+build/
+*.pbxuser
+!default.pbxuser
+*.mode1v3
+!default.mode1v3
+*.mode2v3
+!default.mode2v3
+*.perspectivev3
+!default.perspectivev3
+xcuserdata
+*.xccheckout
+*.moved-aside
+DerivedData
+*.hmap
+*.ipa
+*.xcuserstate
+
+# Gradle:
+.idea/**/gradle.xml
+.idea/**/libraries
+
+# Miscellaneous
+*.class
+
+# Gradle files
+.gradle/
+build/
+
+
+# Android Studio Navigation editor temp files
+.navigation/
+
+# Android Studio captures folder
+captures/
+
+*.log
+*.pyc
+*.swp
+.DS_Store
+.atom/
+.buildlog/
+.history
+.svn/
+migrate_working_dir/
+
+# IntelliJ related
+*.iml
+*.ipr
+*.iws
+.idea/
+
+# The .vscode folder contains launch configuration and tasks you configure in
+# VS Code which you may wish to be included in version control, so this line
+# is commented out by default.
+#.vscode/
+
+# Flutter/Dart/Pub related
+**/doc/api/
+**/ios/Flutter/.last_build_id
+.dart_tool/
+.flutter-plugins
+.flutter-plugins-dependencies
+.packages
+.pub-cache/
+.pub/
+/build/
+/lib/objectbox.g.dart
+
+
+# Symbolication related
+app.*.symbols
+
+# Obfuscation related
+app.*.map.json
+
+# Android Studio will place build artifacts here
+/android/app/debug
+/android/app/profile
+/android/app/release
+
+# CocoaPods
+/ios/Pods/
+ios/DDMWallet/bundle
+Podfile.lock
+
+
+yarn.lock
+.vscode
+

+ 6 - 0
lib/appfx.dart

@@ -0,0 +1,6 @@
+library appfx;
+
+export 'util/tools.dart';
+export 'util/logger.dart';
+
+export 'store/dbMgrBase.dart';

+ 25 - 0
lib/store/appStoreBase.dart

@@ -0,0 +1,25 @@
+
+// import 'package:path/path.dart' as p;
+// import 'package:path_provider/path_provider.dart';
+import 'package:objectbox/objectbox.dart';
+
+
+class AppStoreBase {
+  /// The Store of this app.
+  late final Store store;
+
+  // AppStoreBase._create(this.store) {
+  //   // Add any additional setup code, e.g. build queries.
+  //
+  //   // new box instance
+  // }
+  //
+  // /// Create an instance of ObjectBox to use throughout the app.
+  // static Future<AppStoreBase> create() async {
+  //   final docsDir = await getApplicationDocumentsDirectory();
+  //   // Future<Store> openStore() {...} is defined in the generated objectbox.g.dart
+  //   final store = await openStore(directory: p.join(docsDir.path, "obx"));
+  //   return AppStoreBase._create(store);
+  // }
+
+}

+ 49 - 0
lib/store/dbMgrBase.dart

@@ -0,0 +1,49 @@
+
+import 'package:objectbox/objectbox.dart';
+
+
+abstract class dbMgrBase<T> {
+
+  /// The Store of this app.
+  late final Store store;
+
+  late final Box<T> objectBox;
+
+  dbMgrBase(this.store) {
+    objectBox = Box(store);
+  }
+
+
+  //
+  bool isEmpty() => objectBox.isEmpty();
+
+  //
+  List<T> getAll() => objectBox.getAll();
+  T get(int id) => objectBox.get(id)!;
+  T? getFirst() => objectBox.query().build().findFirst();
+  Future<List<T>> getAllAsync() => objectBox.getAllAsync();
+  Stream<List<T>> getAllStream(QueryProperty<T, dynamic> orderProperty, {int orderFlags = 0}) {
+    // Query for all tasks, sorted by their date.
+    // https://docs.objectbox.io/queries
+    final queryBuilder = objectBox.query().order(orderProperty, flags: orderFlags);
+    // Build and watch the query,
+    // set triggerImmediately to emit the query immediately on listen.
+    return queryBuilder
+        .watch(triggerImmediately: true)
+    // Map it to a list of tasks to be used by a StreamBuilder.
+        .map((query) => query.find());
+  }
+
+  int put(T obj) => objectBox.put(obj);
+  Future<int>putAsync(T obj) => objectBox.putAsync(obj);
+  Future<List<int>>putManyAsync(List<T> objects,
+      {PutMode mode = PutMode.put}) => objectBox.putManyAsync(objects, mode: mode);
+
+
+  void remove(int id) => objectBox.removeAsync(id);
+
+
+
+
+}
+

+ 223 - 0
lib/util/hexUtils.dart

@@ -0,0 +1,223 @@
+import 'dart:convert' show utf8;
+import 'dart:typed_data';
+
+import 'package:convert/convert.dart' show hex;
+
+bool isHexPrefixed(String str) {
+  ArgumentError.checkNotNull(str);
+
+  return str.startsWith('0x');
+}
+
+/// Is the string a hex string.
+bool isHexString(String value, {int length = 0}) {
+  ArgumentError.checkNotNull(value);
+
+  // if (!RegExp('^0x[0-9A-Fa-f]*\$').hasMatch(value)) return false;
+  if (!RegExp(r'\b(?:0[xX])?[0-9a-fA-F]+\b').hasMatch(value)) return false;
+  if (length > 0 && value.length != 2 + 2 * length) return false;
+
+  return true;
+}
+
+String stripHexPrefix(String hexString) {
+  ArgumentError.checkNotNull(hexString);
+
+  if (hexString.startsWith("0x") || hexString.startsWith("0X")) {
+    return hexString.substring(2);
+  }
+  return hexString;
+}
+
+String addHexPrefix(String hexString) {
+  ArgumentError.checkNotNull(hexString);
+
+  if (!hexString.startsWith("0x") && !hexString.startsWith("0X")) {
+    return '0x$hexString';
+  }
+  return hexString;
+}
+
+
+
+/// Pads a [String] to have an even length
+String padToEven(String value) {
+  ArgumentError.checkNotNull(value);
+
+  var a = '$value';
+  if (a.length % 2 == 1) a = '0${a}';
+
+  return a;
+}
+
+/// Converts a [int] into a hex [String]
+String intToHex(i) {
+  ArgumentError.checkNotNull(i);
+
+  return '0x${i.toRadixString(16)}';
+}
+
+/// Converts an [int] or [BigInt] to a [Uint8List]
+Uint8List intToBuffer(i) {
+  return Uint8List.fromList(i == null || i == 0 || i == BigInt.zero ? [] : hex.decode(padToEven(intToHex(i).substring(2))));
+}
+
+Uint8List stringToBuffer(String i) {
+  return Uint8List.fromList(i.isEmpty ? [] : hex.decode(padToEven(stripHexPrefix(i))));
+}
+
+/// Get the binary size of a string
+int getBinarySize(String str) {
+  ArgumentError.checkNotNull(str);
+
+  return utf8.encode(str).length;
+}
+
+/// Returns TRUE if the first specified array contains all elements from the second one. FALSE otherwise.
+bool arrayContainsArray(List superset, List subset, {bool some = false}) {
+  ArgumentError.checkNotNull(superset);
+  ArgumentError.checkNotNull(subset);
+
+  if (some) return Set.from(superset).intersection(Set.from(subset)).length > 0;
+
+  return Set.from(superset).containsAll(subset);
+}
+
+/// Should be called to get utf8 from it's hex representation
+String toUtf8(String hexString) {
+  ArgumentError.checkNotNull(hexString);
+
+  List<int> bufferValue = hex.decode(padToEven(stripHexPrefix(hexString).replaceAll(RegExp('^0+|0+\$'), '')));
+
+  return utf8.decode(bufferValue);
+}
+
+/// Should be called to get ascii from it's hex representation
+String toAscii(String hexString) {
+  ArgumentError.checkNotNull(hexString);
+
+  var start = hexString.startsWith(RegExp('^0x')) ? 2 : 0;
+  return String.fromCharCodes(hex.decode(hexString.substring(start)));
+}
+
+/// Should be called to get hex representation (prefixed by 0x) of utf8 string
+String fromUtf8(String stringValue) {
+  ArgumentError.checkNotNull(stringValue);
+
+  var stringBuffer = utf8.encode(stringValue);
+
+  return "0x${padToEven(hex.encode(stringBuffer)).replaceAll(RegExp('^0+|0+\$'), '')}";
+}
+
+/// Should be called to get hex representation (prefixed by 0x) of ascii string
+String fromAscii(String stringValue) {
+  ArgumentError.checkNotNull(stringValue);
+
+  var hexString = '';
+  for (var i = 0; i < stringValue.length; i++) {
+    var code = stringValue.codeUnitAt(i);
+    var n = hex.encode([code]);
+    hexString += n.length < 2 ? '0${n}' : n;
+  }
+
+  return '0x$hexString';
+}
+
+
+Uint8List hexToBytes(String hexStr) {
+  final bytes = hex.decode(stripHexPrefix(hexStr));
+  if (bytes is Uint8List) return bytes;
+  return Uint8List.fromList(bytes);
+}
+
+String bytesToHex(List<int> bytes,
+    {bool include0x = false,
+      int? forcePadLength,
+      bool padToEvenLength = false}) {
+  var encoded = hex.encode(bytes);
+
+  if (forcePadLength != null) {
+    assert(forcePadLength >= encoded.length);
+
+    final padding = forcePadLength - encoded.length;
+    encoded = ('0' * padding) + encoded;
+  }
+
+  if (padToEvenLength && encoded.length % 2 != 0) encoded = '0$encoded';
+
+  return (include0x ? '0x' : '') + encoded;
+}
+
+
+
+// ------------ by myself -----------
+
+
+String hex2ascii(String hexString) {
+  try {
+    if (isHexString(hexString)) {
+      hexString = stripHexPrefix(hexString);
+      List<String> splitted = [];
+      for (int i = 0; i < hexString.length; i = i + 2) {
+        splitted.add(hexString.substring(i, i + 2));
+      }
+      String ascii = List.generate(splitted.length,
+              (i) => String.fromCharCode(int.parse(splitted[i], radix: 16))).join();
+      return ascii;
+    } else {
+      return '';
+    }
+  } catch (error) {
+    return '';
+  }
+}
+
+String ascii2hex(String asciiString) {
+  try {
+    if (asciiString.isNotEmpty) {
+      String hexStr = '';
+      for (int i = 0; i < asciiString.length; ++i) {
+        hexStr = hexStr + asciiString.codeUnitAt(i).toRadixString(16);
+      }
+      return hexStr;
+    } else {
+      return '';
+    }
+  } catch (error) {
+    return '';
+  }
+}
+
+
+String hex2dec(String hexString) {
+  try {
+    if (isHexString(hexString)) {
+      BigInt? bgInt = BigInt.tryParse(stripHexPrefix(hexString), radix:16);
+      if (bgInt != null) {
+        return bgInt.toRadixString(10);
+      }
+    }
+    // else
+    return '';
+  } catch (error) {
+    return '';
+  }
+}
+
+String dec2hex(String decString) {
+  try {
+    if (decString.isNotEmpty) {
+      BigInt? bgInt = BigInt.tryParse(decString, radix:10);
+      if (bgInt != null) {
+        return addHexPrefix(bgInt.toRadixString(16));
+      }
+    }
+    // else
+    return '';
+  } catch (error) {
+    return '';
+  }
+}
+
+
+

+ 37 - 0
lib/util/logger.dart

@@ -0,0 +1,37 @@
+import 'package:logger/logger.dart';
+
+class Log {
+  static Logger _logger = Logger(
+    printer: PrefixPrinter(PrettyPrinter()),
+  );
+
+  // verbose
+  static void t(dynamic message) {
+    _logger.t(message);
+  }
+
+  // debug
+  static void d(dynamic message) {
+    _logger.d(message);
+  }
+
+  // info
+  static void i(dynamic message) {
+    _logger.i(message);
+  }
+
+  // warning
+  static void w(dynamic message) {
+    _logger.w(message);
+  }
+
+  // error
+  static void e(dynamic message) {
+    _logger.e(message);
+  }
+
+  // wtf
+  static void f(dynamic message) {
+    _logger.f(message);
+  }
+}

+ 56 - 0
lib/util/tools.dart

@@ -0,0 +1,56 @@
+import 'dart:convert';
+
+export 'hexUtils.dart';
+
+
+
+// DateFormat('dd.MM.yy HH:mm:ss').format(dateCreated); // ??
+
+String formatTimeStamp({int? timeStamp, DateTime? date, format='yyyy-MM-dd HH:mm:ss'}) {
+  try {
+    var time = (date != null) ? date
+        : ((timeStamp != null) ? DateTime.fromMillisecondsSinceEpoch(timeStamp) : DateTime.now());
+
+    var dateObj = {
+      'M+': time.month, //月份
+      'd+': time.day, //日
+      'H+': time.hour, //小时
+      'm+': time.minute, //分
+      's+': time.second, //秒
+    };
+    RegExp yearReg = RegExp(r"(y+)");
+    if (yearReg.hasMatch(format)) {
+      var matches = yearReg.allMatches(format);
+      String match = "${matches.elementAt(0).group(1)}";
+      format = format.replaceAll(match, "${time.year}".substring(4 - match.length));
+    }
+    dateObj.forEach((key, value) {
+      RegExp replaceReg = RegExp(r'(' + key + ')');
+      if (replaceReg.hasMatch(format)) {
+        var matches = replaceReg.allMatches(format);
+        String match = "${matches.elementAt(0).group(1)}";
+        format = format.replaceAll(match, (match.length == 1) ? "$value" : "00$value".substring("$value".length));
+      }
+    });
+    return format;
+
+  } catch (error) {
+    return '';
+  }
+}
+
+
+void printJsonStr(String input) {
+  const JsonDecoder decoder = JsonDecoder();
+  const JsonEncoder encoder = JsonEncoder.withIndent('  ');
+  final dynamic object = decoder.convert(input);
+  final dynamic prettyString = encoder.convert(object);
+  prettyString.split('\n').forEach((dynamic element) => print(element));
+}
+
+void printJson(Map input) {
+  const JsonEncoder encoder = JsonEncoder.withIndent('    ');
+  final dynamic prettyString = encoder.convert(input);
+  prettyString.split('\n').forEach((dynamic element) => print(element));
+}
+

+ 768 - 0
pubspec.lock

@@ -0,0 +1,768 @@
+# Generated by pub
+# See https://dart.dev/tools/pub/glossary#lockfile
+packages:
+  _fe_analyzer_shared:
+    dependency: transitive
+    description:
+      name: _fe_analyzer_shared
+      sha256: eb376e9acf6938204f90eb3b1f00b578640d3188b4c8a8ec054f9f479af8d051
+      url: "https://pub.dev"
+    source: hosted
+    version: "64.0.0"
+  analyzer:
+    dependency: transitive
+    description:
+      name: analyzer
+      sha256: "69f54f967773f6c26c7dcb13e93d7ccee8b17a641689da39e878d5cf13b06893"
+      url: "https://pub.dev"
+    source: hosted
+    version: "6.2.0"
+  analyzer_plugin:
+    dependency: transitive
+    description:
+      name: analyzer_plugin
+      sha256: "9661b30b13a685efaee9f02e5d01ed9f2b423bd889d28a304d02d704aee69161"
+      url: "https://pub.dev"
+    source: hosted
+    version: "0.11.3"
+  args:
+    dependency: transitive
+    description:
+      name: args
+      sha256: eef6c46b622e0494a36c5a12d10d77fb4e855501a91c1b9ef9339326e58f0596
+      url: "https://pub.dev"
+    source: hosted
+    version: "2.4.2"
+  async:
+    dependency: transitive
+    description:
+      name: async
+      sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c"
+      url: "https://pub.dev"
+    source: hosted
+    version: "2.11.0"
+  boolean_selector:
+    dependency: transitive
+    description:
+      name: boolean_selector
+      sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66"
+      url: "https://pub.dev"
+    source: hosted
+    version: "2.1.1"
+  build:
+    dependency: transitive
+    description:
+      name: build
+      sha256: "80184af8b6cb3e5c1c4ec6d8544d27711700bc3e6d2efad04238c7b5290889f0"
+      url: "https://pub.dev"
+    source: hosted
+    version: "2.4.1"
+  build_config:
+    dependency: transitive
+    description:
+      name: build_config
+      sha256: bf80fcfb46a29945b423bd9aad884590fb1dc69b330a4d4700cac476af1708d1
+      url: "https://pub.dev"
+    source: hosted
+    version: "1.1.1"
+  build_daemon:
+    dependency: transitive
+    description:
+      name: build_daemon
+      sha256: "0343061a33da9c5810b2d6cee51945127d8f4c060b7fbdd9d54917f0a3feaaa1"
+      url: "https://pub.dev"
+    source: hosted
+    version: "4.0.1"
+  build_resolvers:
+    dependency: transitive
+    description:
+      name: build_resolvers
+      sha256: "339086358431fa15d7eca8b6a36e5d783728cf025e559b834f4609a1fcfb7b0a"
+      url: "https://pub.dev"
+    source: hosted
+    version: "2.4.2"
+  build_runner:
+    dependency: "direct dev"
+    description:
+      name: build_runner
+      sha256: "581bacf68f89ec8792f5e5a0b2c4decd1c948e97ce659dc783688c8a88fbec21"
+      url: "https://pub.dev"
+    source: hosted
+    version: "2.4.8"
+  build_runner_core:
+    dependency: transitive
+    description:
+      name: build_runner_core
+      sha256: c9e32d21dd6626b5c163d48b037ce906bbe428bc23ab77bcd77bb21e593b6185
+      url: "https://pub.dev"
+    source: hosted
+    version: "7.2.11"
+  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: a3ec2e0f967bc47f69f95009bb93db936288d61d5343b9436e378b28a2f830c6
+      url: "https://pub.dev"
+    source: hosted
+    version: "8.9.0"
+  characters:
+    dependency: transitive
+    description:
+      name: characters
+      sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605"
+      url: "https://pub.dev"
+    source: hosted
+    version: "1.3.0"
+  checked_yaml:
+    dependency: transitive
+    description:
+      name: checked_yaml
+      sha256: feb6bed21949061731a7a75fc5d2aa727cf160b91af9a3e464c5e3a32e28b5ff
+      url: "https://pub.dev"
+    source: hosted
+    version: "2.0.3"
+  ci:
+    dependency: transitive
+    description:
+      name: ci
+      sha256: "145d095ce05cddac4d797a158bc4cf3b6016d1fe63d8c3d2fbd7212590adca13"
+      url: "https://pub.dev"
+    source: hosted
+    version: "0.1.0"
+  cli_util:
+    dependency: transitive
+    description:
+      name: cli_util
+      sha256: c05b7406fdabc7a49a3929d4af76bcaccbbffcbcdcf185b082e1ae07da323d19
+      url: "https://pub.dev"
+    source: hosted
+    version: "0.4.1"
+  code_builder:
+    dependency: transitive
+    description:
+      name: code_builder
+      sha256: f692079e25e7869c14132d39f223f8eec9830eb76131925143b2129c4bb01b37
+      url: "https://pub.dev"
+    source: hosted
+    version: "4.10.0"
+  collection:
+    dependency: transitive
+    description:
+      name: collection
+      sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a
+      url: "https://pub.dev"
+    source: hosted
+    version: "1.18.0"
+  convert:
+    dependency: "direct main"
+    description:
+      name: convert
+      sha256: "0f08b14755d163f6e2134cb58222dd25ea2a2ee8a195e53983d57c075324d592"
+      url: "https://pub.dev"
+    source: hosted
+    version: "3.1.1"
+  crypto:
+    dependency: transitive
+    description:
+      name: crypto
+      sha256: ff625774173754681d66daaf4a448684fb04b78f902da9cb3d308c19cc5e8bab
+      url: "https://pub.dev"
+    source: hosted
+    version: "3.0.3"
+  cryptography:
+    dependency: transitive
+    description:
+      name: cryptography
+      sha256: d146b76d33d94548cf035233fbc2f4338c1242fa119013bead807d033fc4ae05
+      url: "https://pub.dev"
+    source: hosted
+    version: "2.7.0"
+  custom_lint:
+    dependency: transitive
+    description:
+      name: custom_lint
+      sha256: dfb893ff17c83cf08676c6b64df11d3e53d80590978d7c1fb242afff3ba6dedb
+      url: "https://pub.dev"
+    source: hosted
+    version: "0.5.8"
+  custom_lint_builder:
+    dependency: transitive
+    description:
+      name: custom_lint_builder
+      sha256: badc07d7737b71e9a9f960f53463f06e09cc6ccdaa1779623015eaf9f9ee8410
+      url: "https://pub.dev"
+    source: hosted
+    version: "0.5.10"
+  custom_lint_core:
+    dependency: transitive
+    description:
+      name: custom_lint_core
+      sha256: bfcc6b518c54d386ad0647ad7a4f415b4db3ea270d09fd9b7f4a1a2df07c3d84
+      url: "https://pub.dev"
+    source: hosted
+    version: "0.5.10"
+  dart_style:
+    dependency: transitive
+    description:
+      name: dart_style
+      sha256: "40ae61a5d43feea6d24bd22c0537a6629db858963b99b4bc1c3db80676f32368"
+      url: "https://pub.dev"
+    source: hosted
+    version: "2.3.4"
+  ffi:
+    dependency: transitive
+    description:
+      name: ffi
+      sha256: "7bf0adc28a23d395f19f3f1eb21dd7cfd1dd9f8e1c50051c069122e6853bc878"
+      url: "https://pub.dev"
+    source: hosted
+    version: "2.1.0"
+  file:
+    dependency: transitive
+    description:
+      name: file
+      sha256: "5fc22d7c25582e38ad9a8515372cd9a93834027aacf1801cf01164dac0ffa08c"
+      url: "https://pub.dev"
+    source: hosted
+    version: "7.0.0"
+  fixnum:
+    dependency: transitive
+    description:
+      name: fixnum
+      sha256: "25517a4deb0c03aa0f32fd12db525856438902d9c16536311e76cdc57b31d7d1"
+      url: "https://pub.dev"
+    source: hosted
+    version: "1.1.0"
+  flat_buffers:
+    dependency: transitive
+    description:
+      name: flat_buffers
+      sha256: "23e2ced0d8e8ecdffbd9f267f49a668c74438393b9acaeac1c724123e3764263"
+      url: "https://pub.dev"
+    source: hosted
+    version: "2.0.5"
+  flutter:
+    dependency: transitive
+    description: flutter
+    source: sdk
+    version: "0.0.0"
+  flutter_riverpod:
+    dependency: "direct main"
+    description:
+      name: flutter_riverpod
+      sha256: da9591d1f8d5881628ccd5c25c40e74fc3eef50ba45e40c3905a06e1712412d5
+      url: "https://pub.dev"
+    source: hosted
+    version: "2.4.9"
+  freezed_annotation:
+    dependency: transitive
+    description:
+      name: freezed_annotation
+      sha256: c3fd9336eb55a38cc1bbd79ab17573113a8deccd0ecbbf926cca3c62803b5c2d
+      url: "https://pub.dev"
+    source: hosted
+    version: "2.4.1"
+  frontend_server_client:
+    dependency: transitive
+    description:
+      name: frontend_server_client
+      sha256: "408e3ca148b31c20282ad6f37ebfa6f4bdc8fede5b74bc2f08d9d92b55db3612"
+      url: "https://pub.dev"
+    source: hosted
+    version: "3.2.0"
+  glob:
+    dependency: transitive
+    description:
+      name: glob
+      sha256: "0e7014b3b7d4dac1ca4d6114f82bf1782ee86745b9b42a92c9289c23d8a0ab63"
+      url: "https://pub.dev"
+    source: hosted
+    version: "2.1.2"
+  graphs:
+    dependency: transitive
+    description:
+      name: graphs
+      sha256: aedc5a15e78fc65a6e23bcd927f24c64dd995062bcd1ca6eda65a3cff92a4d19
+      url: "https://pub.dev"
+    source: hosted
+    version: "2.3.1"
+  hotreloader:
+    dependency: transitive
+    description:
+      name: hotreloader
+      sha256: "94ee21a60ea2836500799f3af035dc3212b1562027f1e0031c14e087f0231449"
+      url: "https://pub.dev"
+    source: hosted
+    version: "4.1.0"
+  http:
+    dependency: transitive
+    description:
+      name: http
+      sha256: a2bbf9d017fcced29139daa8ed2bba4ece450ab222871df93ca9eec6f80c34ba
+      url: "https://pub.dev"
+    source: hosted
+    version: "1.2.0"
+  http_multi_server:
+    dependency: transitive
+    description:
+      name: http_multi_server
+      sha256: "97486f20f9c2f7be8f514851703d0119c3596d14ea63227af6f7a481ef2b2f8b"
+      url: "https://pub.dev"
+    source: hosted
+    version: "3.2.1"
+  http_parser:
+    dependency: transitive
+    description:
+      name: http_parser
+      sha256: "2aa08ce0341cc9b354a498388e30986515406668dbcc4f7c950c3e715496693b"
+      url: "https://pub.dev"
+    source: hosted
+    version: "4.0.2"
+  io:
+    dependency: transitive
+    description:
+      name: io
+      sha256: "2ec25704aba361659e10e3e5f5d672068d332fc8ac516421d483a11e5cbd061e"
+      url: "https://pub.dev"
+    source: hosted
+    version: "1.0.4"
+  js:
+    dependency: transitive
+    description:
+      name: js
+      sha256: f2c445dce49627136094980615a031419f7f3eb393237e4ecd97ac15dea343f3
+      url: "https://pub.dev"
+    source: hosted
+    version: "0.6.7"
+  json_annotation:
+    dependency: transitive
+    description:
+      name: json_annotation
+      sha256: b10a7b2ff83d83c777edba3c6a0f97045ddadd56c944e1a23a3fdf43a1bf4467
+      url: "https://pub.dev"
+    source: hosted
+    version: "4.8.1"
+  logger:
+    dependency: "direct main"
+    description:
+      name: logger
+      sha256: "6bbb9d6f7056729537a4309bda2e74e18e5d9f14302489cc1e93f33b3fe32cac"
+      url: "https://pub.dev"
+    source: hosted
+    version: "2.0.2+1"
+  logging:
+    dependency: transitive
+    description:
+      name: logging
+      sha256: "623a88c9594aa774443aa3eb2d41807a48486b5613e67599fb4c41c0ad47c340"
+      url: "https://pub.dev"
+    source: hosted
+    version: "1.2.0"
+  matcher:
+    dependency: transitive
+    description:
+      name: matcher
+      sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb
+      url: "https://pub.dev"
+    source: hosted
+    version: "0.12.16+1"
+  material_color_utilities:
+    dependency: transitive
+    description:
+      name: material_color_utilities
+      sha256: "9528f2f296073ff54cb9fee677df673ace1218163c3bc7628093e7eed5203d41"
+      url: "https://pub.dev"
+    source: hosted
+    version: "0.5.0"
+  meta:
+    dependency: transitive
+    description:
+      name: meta
+      sha256: a6e590c838b18133bb482a2745ad77c5bb7715fb0451209e1a7567d416678b8e
+      url: "https://pub.dev"
+    source: hosted
+    version: "1.10.0"
+  mime:
+    dependency: transitive
+    description:
+      name: mime
+      sha256: "2e123074287cc9fd6c09de8336dae606d1ddb88d9ac47358826db698c176a1f2"
+      url: "https://pub.dev"
+    source: hosted
+    version: "1.0.5"
+  objectbox:
+    dependency: "direct main"
+    description:
+      name: objectbox
+      sha256: "949747f51e9cf6063ccc820e0a3a1f5f1d4d1530cde62663d7c883a38738d895"
+      url: "https://pub.dev"
+    source: hosted
+    version: "2.4.0"
+  objectbox_flutter_libs:
+    dependency: "direct main"
+    description:
+      name: objectbox_flutter_libs
+      sha256: "88e44800d6d5864fb99b483ebabbd9bbff0fa6a7eb448de86a94db501010368d"
+      url: "https://pub.dev"
+    source: hosted
+    version: "2.4.0"
+  objectbox_generator:
+    dependency: "direct dev"
+    description:
+      name: objectbox_generator
+      sha256: "8e9e5be6f56a22dbe54491d64bdb57a510de525109ce3481b7a0e72b6d8e04d9"
+      url: "https://pub.dev"
+    source: hosted
+    version: "2.4.0"
+  package_config:
+    dependency: transitive
+    description:
+      name: package_config
+      sha256: "1c5b77ccc91e4823a5af61ee74e6b972db1ef98c2ff5a18d3161c982a55448bd"
+      url: "https://pub.dev"
+    source: hosted
+    version: "2.1.0"
+  path:
+    dependency: "direct main"
+    description:
+      name: path
+      sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af"
+      url: "https://pub.dev"
+    source: hosted
+    version: "1.9.0"
+  path_provider:
+    dependency: "direct main"
+    description:
+      name: path_provider
+      sha256: b27217933eeeba8ff24845c34003b003b2b22151de3c908d0e679e8fe1aa078b
+      url: "https://pub.dev"
+    source: hosted
+    version: "2.1.2"
+  path_provider_android:
+    dependency: transitive
+    description:
+      name: path_provider_android
+      sha256: "477184d672607c0a3bf68fbbf601805f92ef79c82b64b4d6eb318cbca4c48668"
+      url: "https://pub.dev"
+    source: hosted
+    version: "2.2.2"
+  path_provider_foundation:
+    dependency: transitive
+    description:
+      name: path_provider_foundation
+      sha256: "5a7999be66e000916500be4f15a3633ebceb8302719b47b9cc49ce924125350f"
+      url: "https://pub.dev"
+    source: hosted
+    version: "2.3.2"
+  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: "8bc9f22eee8690981c22aa7fc602f5c85b497a6fb2ceb35ee5a5e5ed85ad8170"
+      url: "https://pub.dev"
+    source: hosted
+    version: "2.2.1"
+  platform:
+    dependency: transitive
+    description:
+      name: platform
+      sha256: "12220bb4b65720483f8fa9450b4332347737cf8213dd2840d8b2c823e47243ec"
+      url: "https://pub.dev"
+    source: hosted
+    version: "3.1.4"
+  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"
+  pub_semver:
+    dependency: transitive
+    description:
+      name: pub_semver
+      sha256: "40d3ab1bbd474c4c2328c91e3a7df8c6dd629b79ece4c4bd04bee496a224fb0c"
+      url: "https://pub.dev"
+    source: hosted
+    version: "2.1.4"
+  pubspec_parse:
+    dependency: transitive
+    description:
+      name: pubspec_parse
+      sha256: c63b2876e58e194e4b0828fcb080ad0e06d051cb607a6be51a9e084f47cb9367
+      url: "https://pub.dev"
+    source: hosted
+    version: "1.2.3"
+  riverpod:
+    dependency: transitive
+    description:
+      name: riverpod
+      sha256: "942999ee48b899f8a46a860f1e13cee36f2f77609eb54c5b7a669bb20d550b11"
+      url: "https://pub.dev"
+    source: hosted
+    version: "2.4.9"
+  riverpod_analyzer_utils:
+    dependency: transitive
+    description:
+      name: riverpod_analyzer_utils
+      sha256: d4dabc35358413bf4611fcb6abb46308a67c4ef4cd5e69fd3367b11925c59f57
+      url: "https://pub.dev"
+    source: hosted
+    version: "0.5.0"
+  riverpod_annotation:
+    dependency: "direct main"
+    description:
+      name: riverpod_annotation
+      sha256: b70e95fbd5ca7ce42f5148092022971bb2e9843b6ab71e97d479e8ab52e98979
+      url: "https://pub.dev"
+    source: hosted
+    version: "2.3.3"
+  riverpod_generator:
+    dependency: "direct dev"
+    description:
+      name: riverpod_generator
+      sha256: ff8f064f1d7ef3cc6af481bba8e9a3fcdb4d34df34fac1b39bbc003167065be0
+      url: "https://pub.dev"
+    source: hosted
+    version: "2.3.9"
+  riverpod_lint:
+    dependency: "direct dev"
+    description:
+      name: riverpod_lint
+      sha256: "944929ef82c9bfeaa455ccab97920abcf847a0ffed5c9f6babc520a95db25176"
+      url: "https://pub.dev"
+    source: hosted
+    version: "2.3.7"
+  rxdart:
+    dependency: transitive
+    description:
+      name: rxdart
+      sha256: "0c7c0cedd93788d996e33041ffecda924cc54389199cde4e6a34b440f50044cb"
+      url: "https://pub.dev"
+    source: hosted
+    version: "0.27.7"
+  shelf:
+    dependency: transitive
+    description:
+      name: shelf
+      sha256: ad29c505aee705f41a4d8963641f91ac4cee3c8fad5947e033390a7bd8180fa4
+      url: "https://pub.dev"
+    source: hosted
+    version: "1.4.1"
+  shelf_web_socket:
+    dependency: transitive
+    description:
+      name: shelf_web_socket
+      sha256: "9ca081be41c60190ebcb4766b2486a7d50261db7bd0f5d9615f2d653637a84c1"
+      url: "https://pub.dev"
+    source: hosted
+    version: "1.0.4"
+  sky_engine:
+    dependency: transitive
+    description: flutter
+    source: sdk
+    version: "0.0.99"
+  source_gen:
+    dependency: transitive
+    description:
+      name: source_gen
+      sha256: "14658ba5f669685cd3d63701d01b31ea748310f7ab854e471962670abcf57832"
+      url: "https://pub.dev"
+    source: hosted
+    version: "1.5.0"
+  source_span:
+    dependency: transitive
+    description:
+      name: source_span
+      sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c"
+      url: "https://pub.dev"
+    source: hosted
+    version: "1.10.0"
+  sprintf:
+    dependency: transitive
+    description:
+      name: sprintf
+      sha256: "1fc9ffe69d4df602376b52949af107d8f5703b77cda567c4d7d86a0693120f23"
+      url: "https://pub.dev"
+    source: hosted
+    version: "7.0.0"
+  stack_trace:
+    dependency: transitive
+    description:
+      name: stack_trace
+      sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b"
+      url: "https://pub.dev"
+    source: hosted
+    version: "1.11.1"
+  state_notifier:
+    dependency: transitive
+    description:
+      name: state_notifier
+      sha256: b8677376aa54f2d7c58280d5a007f9e8774f1968d1fb1c096adcb4792fba29bb
+      url: "https://pub.dev"
+    source: hosted
+    version: "1.0.0"
+  stream_channel:
+    dependency: transitive
+    description:
+      name: stream_channel
+      sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7
+      url: "https://pub.dev"
+    source: hosted
+    version: "2.1.2"
+  stream_transform:
+    dependency: transitive
+    description:
+      name: stream_transform
+      sha256: "14a00e794c7c11aa145a170587321aedce29769c08d7f58b1d141da75e3b1c6f"
+      url: "https://pub.dev"
+    source: hosted
+    version: "2.1.0"
+  string_scanner:
+    dependency: transitive
+    description:
+      name: string_scanner
+      sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde"
+      url: "https://pub.dev"
+    source: hosted
+    version: "1.2.0"
+  term_glyph:
+    dependency: transitive
+    description:
+      name: term_glyph
+      sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84
+      url: "https://pub.dev"
+    source: hosted
+    version: "1.2.1"
+  test_api:
+    dependency: transitive
+    description:
+      name: test_api
+      sha256: "9955ae474176f7ac8ee4e989dadfb411a58c30415bcfb648fa04b2b8a03afa7f"
+      url: "https://pub.dev"
+    source: hosted
+    version: "0.7.0"
+  timing:
+    dependency: transitive
+    description:
+      name: timing
+      sha256: "70a3b636575d4163c477e6de42f247a23b315ae20e86442bebe32d3cabf61c32"
+      url: "https://pub.dev"
+    source: hosted
+    version: "1.0.1"
+  typed_data:
+    dependency: transitive
+    description:
+      name: typed_data
+      sha256: facc8d6582f16042dd49f2463ff1bd6e2c9ef9f3d5da3d9b087e244a7b564b3c
+      url: "https://pub.dev"
+    source: hosted
+    version: "1.3.2"
+  uuid:
+    dependency: transitive
+    description:
+      name: uuid
+      sha256: cd210a09f7c18cbe5a02511718e0334de6559871052c90a90c0cca46a4aa81c8
+      url: "https://pub.dev"
+    source: hosted
+    version: "4.3.3"
+  vector_math:
+    dependency: transitive
+    description:
+      name: vector_math
+      sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803"
+      url: "https://pub.dev"
+    source: hosted
+    version: "2.1.4"
+  vm_service:
+    dependency: transitive
+    description:
+      name: vm_service
+      sha256: b3d56ff4341b8f182b96aceb2fa20e3dcb336b9f867bc0eafc0de10f1048e957
+      url: "https://pub.dev"
+    source: hosted
+    version: "13.0.0"
+  watcher:
+    dependency: transitive
+    description:
+      name: watcher
+      sha256: "3d2ad6751b3c16cf07c7fca317a1413b3f26530319181b37e3b9039b84fc01d8"
+      url: "https://pub.dev"
+    source: hosted
+    version: "1.1.0"
+  web:
+    dependency: transitive
+    description:
+      name: web
+      sha256: afe077240a270dcfd2aafe77602b4113645af95d0ad31128cc02bce5ac5d5152
+      url: "https://pub.dev"
+    source: hosted
+    version: "0.3.0"
+  web_socket_channel:
+    dependency: transitive
+    description:
+      name: web_socket_channel
+      sha256: d88238e5eac9a42bb43ca4e721edba3c08c6354d4a53063afaa568516217621b
+      url: "https://pub.dev"
+    source: hosted
+    version: "2.4.0"
+  win32:
+    dependency: transitive
+    description:
+      name: win32
+      sha256: "464f5674532865248444b4c3daca12bd9bf2d7c47f759ce2617986e7229494a8"
+      url: "https://pub.dev"
+    source: hosted
+    version: "5.2.0"
+  xdg_directories:
+    dependency: transitive
+    description:
+      name: xdg_directories
+      sha256: faea9dee56b520b55a566385b84f2e8de55e7496104adada9962e0bd11bcff1d
+      url: "https://pub.dev"
+    source: hosted
+    version: "1.0.4"
+  yaml:
+    dependency: transitive
+    description:
+      name: yaml
+      sha256: "75769501ea3489fca56601ff33454fe45507ea3bfb014161abc3b43ae25989d5"
+      url: "https://pub.dev"
+    source: hosted
+    version: "3.1.2"
+sdks:
+  dart: ">=3.2.2 <4.0.0"
+  flutter: ">=3.10.0"

+ 24 - 0
pubspec.yaml

@@ -0,0 +1,24 @@
+name: appfx
+description: A framework for flutter app. By James.
+version: 1.0.0
+
+publish_to: 'none' # Remove this line if you wish to publish to pub.dev
+
+environment:
+  sdk: '>=3.2.2 <4.0.0'
+
+dependencies:
+  convert: ^3.1.1
+  flutter_riverpod: ^2.4.9
+  riverpod_annotation: ^2.3.3
+  objectbox: ^2.4.0
+  objectbox_flutter_libs: any
+  path: ^1.8.3
+  path_provider: ^2.1.2
+  logger: ^2.0.2+1
+
+dev_dependencies:
+  build_runner: ^2.4.8
+  riverpod_generator: ^2.3.9
+  riverpod_lint: ^2.3.7
+  objectbox_generator: any