perf(android): R8, bitmap downscaling, edge-to-edge; recover device compat; publish to production
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).
This commit is contained in:
parent
f17ae7751c
commit
071be44851
17 changed files with 232 additions and 21 deletions
|
|
@ -1,3 +1,4 @@
|
|||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter/widgets.dart';
|
||||
|
||||
import 'bootstrap.dart';
|
||||
|
|
@ -6,6 +7,16 @@ 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.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue