20 lines
548 B
Dart
20 lines
548 B
Dart
import 'package:flutter/material.dart';
|
|
|
|
import 'app.dart';
|
|
|
|
void main() {
|
|
// Optional preview hook: `--dart-define=PLATFORM_OVERRIDE=ios|android`
|
|
// forces the Cupertino or Material UI (used for screenshots on non-mobile
|
|
// hosts). Unset on a real phone, so the running platform decides.
|
|
const override = String.fromEnvironment('PLATFORM_OVERRIDE');
|
|
runApp(
|
|
DeviceCodeApp(
|
|
platform: switch (override) {
|
|
'ios' => TargetPlatform.iOS,
|
|
'android' => TargetPlatform.android,
|
|
_ => null,
|
|
},
|
|
),
|
|
);
|
|
}
|