|
|
@ -2,7 +2,6 @@ import 'dart:async'; |
|
|
|
|
|
|
|
|
|
|
|
import 'package:flutter/material.dart'; |
|
|
|
import 'package:flutter/material.dart'; |
|
|
|
import 'package:flutter_native_splash/flutter_native_splash.dart'; |
|
|
|
import 'package:flutter_native_splash/flutter_native_splash.dart'; |
|
|
|
import 'package:meta/meta.dart'; |
|
|
|
|
|
|
|
import 'package:neon/src/app.dart'; |
|
|
|
import 'package:neon/src/app.dart'; |
|
|
|
import 'package:neon/src/blocs/accounts.dart'; |
|
|
|
import 'package:neon/src/blocs/accounts.dart'; |
|
|
|
import 'package:neon/src/blocs/first_launch.dart'; |
|
|
|
import 'package:neon/src/blocs/first_launch.dart'; |
|
|
@ -14,13 +13,11 @@ import 'package:neon/src/platform/platform.dart'; |
|
|
|
import 'package:neon/src/theme/neon.dart'; |
|
|
|
import 'package:neon/src/theme/neon.dart'; |
|
|
|
import 'package:neon/src/utils/global_options.dart'; |
|
|
|
import 'package:neon/src/utils/global_options.dart'; |
|
|
|
import 'package:neon/src/utils/request_manager.dart'; |
|
|
|
import 'package:neon/src/utils/request_manager.dart'; |
|
|
|
|
|
|
|
import 'package:neon/src/utils/user_agent.dart'; |
|
|
|
import 'package:package_info_plus/package_info_plus.dart'; |
|
|
|
import 'package:package_info_plus/package_info_plus.dart'; |
|
|
|
import 'package:provider/provider.dart'; |
|
|
|
import 'package:provider/provider.dart'; |
|
|
|
import 'package:shared_preferences/shared_preferences.dart'; |
|
|
|
import 'package:shared_preferences/shared_preferences.dart'; |
|
|
|
|
|
|
|
|
|
|
|
@internal |
|
|
|
|
|
|
|
late final String neonUserAgent; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Future runNeon({ |
|
|
|
Future runNeon({ |
|
|
|
required final Iterable<AppImplementation> Function(SharedPreferences, RequestManager, NeonPlatform) |
|
|
|
required final Iterable<AppImplementation> Function(SharedPreferences, RequestManager, NeonPlatform) |
|
|
|
getAppImplementations, |
|
|
|
getAppImplementations, |
|
|
@ -43,11 +40,7 @@ Future runNeon({ |
|
|
|
final allAppImplementations = getAppImplementations(sharedPreferences, requestManager, platform); |
|
|
|
final allAppImplementations = getAppImplementations(sharedPreferences, requestManager, platform); |
|
|
|
|
|
|
|
|
|
|
|
final packageInfo = await PackageInfo.fromPlatform(); |
|
|
|
final packageInfo = await PackageInfo.fromPlatform(); |
|
|
|
var buildNumber = packageInfo.buildNumber; |
|
|
|
buildUserAgent(packageInfo); |
|
|
|
if (buildNumber.isEmpty) { |
|
|
|
|
|
|
|
buildNumber = '1'; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
neonUserAgent = 'Neon ${packageInfo.version}+$buildNumber'; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
final globalOptions = GlobalOptions( |
|
|
|
final globalOptions = GlobalOptions( |
|
|
|
sharedPreferences, |
|
|
|
sharedPreferences, |
|
|
|