wechat_camera_picker_plus 1.0.3
wechat_camera_picker_plus: ^1.0.3 copied to clipboard
A camera picker for Flutter projects based on WeChat's UI, which is also a separate runnable extension to the wechat_assets_picker_plus.
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_localizations/flutter_localizations.dart';
import 'extensions/color_extension.dart';
/// Common picking methods are defined in [pickMethods].
/// 常见的选择器调用方式定义在 [pickMethods]。
import 'models/picker_method.dart';
import 'pages/splash_page.dart';
const Color themeColor = Color(0xff00bc56);
String? packageVersion;
void main() {
runApp(const MyApp());
SystemChrome.setSystemUIOverlayStyle(
SystemUiOverlayStyle.dark.copyWith(statusBarColor: Colors.transparent),
);
}
class MyApp extends StatelessWidget {
const MyApp({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'WeChat Camera Picker Demo',
theme: ThemeData(
brightness:
MediaQueryData.fromView(View.of(context)).platformBrightness,
primarySwatch: themeColor.swatch,
textSelectionTheme: const TextSelectionThemeData(
cursorColor: themeColor,
),
),
home: const SplashPage(),
localizationsDelegates: const <LocalizationsDelegate<dynamic>>[
GlobalWidgetsLocalizations.delegate,
GlobalMaterialLocalizations.delegate,
GlobalCupertinoLocalizations.delegate,
],
supportedLocales: const <Locale>[
Locale('en'), // English
Locale('zh'), // Chinese
],
locale: const Locale('en'),
);
}
}