wechat_camera_picker 4.3.4 copy "wechat_camera_picker: ^4.3.4" to clipboard
wechat_camera_picker: ^4.3.4 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.

example/lib/main.dart

// Copyright 2019 The FlutterCandies author. All rights reserved.
// Use of this source code is governed by an Apache license that can be found
// in the LICENSE file.

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

import 'extensions/color_extension.dart';
import 'extensions/l10n_extensions.dart';
import 'l10n/gen/app_localizations.dart';
import 'pages/splash_page.dart';

const Color themeColor = Color(0xff00bc56);

/// The mock size is used for integration tests.
/// Changing this requires at least a hot-restart.
const Size? mockSize = null;

String? packageVersion;

void main() {
  runApp(const MyApp());
  SystemChrome.setSystemUIOverlayStyle(
    SystemUiOverlayStyle.dark.copyWith(statusBarColor: Colors.transparent),
  );
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      onGenerateTitle: (BuildContext context) => context.l10n.appTitle,
      theme: ThemeData(
        brightness: Brightness.light,
        primarySwatch: themeColor.swatch,
        textSelectionTheme: const TextSelectionThemeData(
          cursorColor: themeColor,
        ),
      ),
      darkTheme: ThemeData(
        brightness: Brightness.dark,
        primarySwatch: themeColor.swatch,
        textSelectionTheme: const TextSelectionThemeData(
          cursorColor: themeColor,
        ),
      ),
      home: const SplashPage(),
      localizationsDelegates: AppLocalizations.localizationsDelegates,
      supportedLocales: AppLocalizations.supportedLocales,
      builder: (context, child) {
        if (mockSize == null) {
          return child!;
        }
        final mq = MediaQuery.of(context).copyWith(size: mockSize);
        return MediaQuery(
          data: mq,
          child: Align(
            alignment: Alignment.topCenter,
            child: SizedBox.fromSize(size: mockSize, child: child),
          ),
        );
      },
    );
  }
}
250
likes
150
pub points
97%
popularity
screenshot

Publisher

verified publisherfluttercandies.com

A camera picker for Flutter projects based on WeChat's UI, which is also a separate runnable extension to the wechat_assets_picker.

Repository (GitHub)
View/report issues

Topics

#picker #camera #image #video #wechat

Documentation

API reference

License

Apache-2.0 (license)

Dependencies

camera, camera_android, camera_platform_interface, collection, flutter, path, photo_manager, photo_manager_image_provider, sensors_plus, video_player, wechat_picker_library

More

Packages that depend on wechat_camera_picker