tencent_im_sdk_plugin 4.0.4-bugfix tencent_im_sdk_plugin: ^4.0.4-bugfix copied to clipboard
Instant Messaging (Instant Messaging) is developed based on QQ's underlying IM capabilities.
import 'package:example/config/config.dart';
import 'package:example/custom_animation.dart';
import 'package:example/index/index.dart';
import 'package:example/provider/event.dart';
import 'package:example/provider/notice.dart';
import 'package:flutter_easyloading/flutter_easyloading.dart';
import 'package:flutter_localizations/flutter_localizations.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import 'i18n/strings.g.dart';
void main() {
WidgetsFlutterBinding.ensureInitialized();
LocaleSettings.useDeviceLocale();
runApp(
TranslationProvider(
child: MultiProvider(
providers: [
ChangeNotifierProvider(create: (_) => Notice()),
ChangeNotifierProvider(create: (_) => Event()),
],
child: APIExampleApp(),
),
),
);
configLoading();
}
class APIExampleApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
locale: TranslationProvider.of(context).flutterLocale,
supportedLocales: LocaleSettings.supportedLocales,
localizationsDelegates: GlobalMaterialLocalizations.delegates,
home: Index(),
title: Config.appName,
builder: EasyLoading.init(),
);
}
}
void configLoading() {
EasyLoading.instance
..displayDuration = const Duration(milliseconds: 2000)
..indicatorType = EasyLoadingIndicatorType.fadingCircle
..loadingStyle = EasyLoadingStyle.dark
..indicatorSize = 45.0
..radius = 10.0
..progressColor = Colors.yellow
..backgroundColor = Colors.green
..indicatorColor = Colors.yellow
..textColor = Colors.yellow
..maskColor = Colors.blue.withOpacity(0.5)
..userInteractions = true
..dismissOnTap = false
..customAnimation = CustomAnimation();
}