Device compatibility (regression fix): - The CAMERA permission (from zxing_barcode_scanner / image_picker) implicitly required android.hardware.camera, excluding camera-less devices — Play showed Automotive -96%, Chromebook -86%, TV -25%. Declare camera & location uses-feature required="false" to keep those devices supported. - Detect a real camera at runtime (PackageManager.FEATURE_CAMERA_ANY via the existing MethodChannel), cache it at bootstrap, and hide the QR scan button and the camera photo-source option when absent, so no broken actions are offered. Play "app optimization" recommendations: - Enable R8 (isMinifyEnabled + isShrinkResources) with keep rules for the OCR (tesseract4android), SQLCipher and notifications JNI/reflection code. - Bitmap downscaling: cacheWidth/cacheHeight (and ResizeImage for avatars) on list thumbnails and avatars so photos decode to on-screen size, not full res. - Edge-to-edge: opt in with transparent system bars in main(). Release flow: - Tagged builds now publish to the production track at 100% (was internal); add a manual deploy_internal lane as a QA safety net. - Document country/region availability as a Play Console setting (not in-repo).
33 lines
1.4 KiB
Dart
33 lines
1.4 KiB
Dart
import 'package:flutter/services.dart';
|
|
import 'package:flutter/widgets.dart';
|
|
|
|
import 'bootstrap.dart';
|
|
import 'i18n/strings.g.dart';
|
|
import 'ui/restart_widget.dart';
|
|
|
|
void main() {
|
|
WidgetsFlutterBinding.ensureInitialized();
|
|
// Draw behind the system bars (edge-to-edge) with transparent bars, so the app
|
|
// fills the screen on Android 15+ (where edge-to-edge is enforced) and stays
|
|
// consistent elsewhere. Scaffolds use SafeArea to keep content off the insets.
|
|
SystemChrome.setEnabledSystemUIMode(SystemUiMode.edgeToEdge);
|
|
SystemChrome.setSystemUIOverlayStyle(
|
|
const SystemUiOverlayStyle(
|
|
statusBarColor: Color(0x00000000),
|
|
systemNavigationBarColor: Color(0x00000000),
|
|
),
|
|
);
|
|
// Start from the device language, then let an explicit in-app choice win —
|
|
// it's the only reliable way to reach languages the OS picker doesn't offer
|
|
// (e.g. Asturian). The saved choice is restored inside [Bootstrap], after DI.
|
|
LocaleSettings.useDeviceLocaleSync();
|
|
// Paint immediately: [Bootstrap] shows a splash and runs the heavy init off
|
|
// the first frame. Wrapped in [RestartWidget] so switching the social identity
|
|
// (which re-registers the social singletons) can rebuild the whole tree —
|
|
// Bootstrap re-reads its dependencies from the locator on each rebuild.
|
|
runApp(
|
|
RestartWidget(
|
|
builder: () => TranslationProvider(child: const Bootstrap()),
|
|
),
|
|
);
|
|
}
|