tdlib 1.1.1 tdlib: ^1.1.1 copied to clipboard
Flutter Plugin for TDLib.a complete tdlib-tdjson binding package.
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import 'package:tdlib_example/utils/router.dart';
import 'package:tdlib_example/screens/login/login.dart';
import 'package:tdlib_example/utils/const.dart';
import 'package:tdlib_example/services/telegram_service.dart';
void main() {
//SystemChrome.setSystemUIOverlayStyle(SystemUiOverlay.);
final GlobalKey<NavigatorState> navigatorKey =
new GlobalKey<NavigatorState>();
runApp(
MultiProvider(
providers: [
Provider<TelegramService>(
create: (_) =>
TelegramService(navigatorKey, lastRouteName: loginRoute)),
],
child: MyApp(),
),
);
}
class MyApp extends StatelessWidget {
MyApp();
@override
Widget build(BuildContext context) {
print(1234324234235);
return MaterialApp(
title: 'Flutter Demo',
theme: ThemeData.dark(),
onGenerateRoute: Router.generateRoute,
initialRoute: loginRoute,
/*home: Container(
decoration: BoxDecoration(
color: Colors.white,
),
child: Center(child: Text('test')),
),
*/
);
}
}