Skip to content

Commit

Permalink
tmp
Browse files Browse the repository at this point in the history
  • Loading branch information
Khen Solomon Lethil committed Oct 11, 2020
1 parent a1ada26 commit 3d1c40b
Showing 1 changed file with 82 additions and 0 deletions.
82 changes: 82 additions & 0 deletions lib/main.working.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@

import 'package:flutter/material.dart';
// import 'package:flutter/cupertino.dart';
// import 'package:flutter/services.dart';

// import 'package:bible/screen/main.dart';
// import 'package:bible/screen/color.dart';
// import 'package:bible/screen/speak.dart';
import 'package:bible/core.dart';

import 'package:flutter/foundation.dart';
// import 'package:flutter/material.dart';
import 'package:flutter/scheduler.dart' show timeDilation;
// import 'package:flutter_gen/gen_l10n/gallery_localizations.dart';
// import 'package:flutter_localized_locales/flutter_localized_locales.dart';
// import 'package:gallery/routes.dart';
// import 'package:google_fonts/google_fonts.dart';
// import 'package:gallery/constants.dart';
// import 'package:gallery/data/gallery_options.dart';
// import 'package:gallery/pages/backdrop.dart';
// import 'package:gallery/pages/splash.dart';
// import 'package:gallery/themes/gallery_theme_data.dart';

import 'package:bible/idea/constants.dart';
import 'package:bible/idea/option.dart';
import 'package:bible/idea/theme.dart';
import 'package:bible/idea/route.dart';

void main() => runApp(LaiSiangtho());

class LaiSiangtho extends StatelessWidget {
const LaiSiangtho({
Key key,
this.initialRoute,
this.isTesting: false,
}) : super(key: key);

final bool isTesting;
final String initialRoute;

@override
Widget build(BuildContext context) {
return ModelBinding(
initialModel: ApplyOptions(
themeMode: ThemeMode.system,
textScaleFactor: systemTextScaleFactorOption,
customTextDirection: CustomTextDirection.localeBased,
locale: null,
timeDilation: timeDilation,
platform: defaultTargetPlatform,
isTesting: isTesting,
),
child: Builder(
builder: (context) => MaterialApp(
title: Core.instance.appName,
debugShowCheckedModeBanner: false,
themeMode: ApplyOptions.of(context).themeMode,
theme: ApplyThemeData.lightThemeData.copyWith(
platform: ApplyOptions.of(context).platform,
),
darkTheme: ApplyThemeData.darkThemeData.copyWith(
platform: ApplyOptions.of(context).platform,
),
// localizationsDelegates: const [
// ...GalleryLocalizations.localizationsDelegates,
// LocaleNamesLocalizationsDelegate()
// ],
// supportedLocales: GalleryLocalizations.supportedLocales,
locale: ApplyOptions.of(context).locale,
localeResolutionCallback: (locale, supportedLocales) {
deviceLocale = locale;
print(locale);
return locale;
},
initialRoute: initialRoute,
onGenerateRoute: RouteConfiguration.onGenerateRoute,
// onUnknownRoute: RouteConfiguration.onUnknownRoute,
)
),
);
}
}

0 comments on commit 3d1c40b

Please sign in to comment.