31 lines
706 B
Dart
31 lines
706 B
Dart
import 'package:flutter/material.dart';
|
|
import 'package:checker/screens/splash.dart';
|
|
import 'package:checker/consts.dart';
|
|
import 'package:flutter/services.dart';
|
|
|
|
const platform = const MethodChannel('com.dinect.checker/instance_id');
|
|
|
|
/// Точка входа в приложение.
|
|
|
|
|
|
///
|
|
/// some changes
|
|
|
|
void main() {
|
|
platform.invokeMethod('getAppTitle').then((title) {
|
|
runApp(new Checker(appName: title));
|
|
});
|
|
}
|
|
|
|
class Checker extends StatelessWidget {
|
|
Checker({this.appName});
|
|
final String appName;
|
|
|
|
@override Widget build (BuildContext context) {
|
|
print('app name = ${appName}');
|
|
return new MaterialApp(
|
|
title: appName,
|
|
home: new SplashScreen()
|
|
);
|
|
}
|
|
} |