wechat_assets_picker 9.3.3 copy "wechat_assets_picker: ^9.3.3" to clipboard
wechat_assets_picker: ^9.3.3 copied to clipboard

An image picker (also with videos and audio) for Flutter projects based on WeChat's UI, with full support for customization.

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 'package:wechat_assets_picker/wechat_assets_picker.dart';
import 'package:wechat_assets_picker_demo/l10n/gen/app_localizations.dart';

import 'constants/extensions.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),
  );
  AssetPicker.registerObserve();
  // Enables logging with the photo_manager.
  PhotoManager.setLog(true);
}

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

  ThemeData _buildTheme(Brightness brightness) {
    return ThemeData(
      brightness: brightness,
      primarySwatch: themeColor.swatch,
      textSelectionTheme: const TextSelectionThemeData(cursorColor: themeColor),
    );
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      onGenerateTitle: (context) => context.l10n.appTitle,
      theme: _buildTheme(Brightness.light),
      darkTheme: _buildTheme(Brightness.dark),
      home: const SplashPage(),
      builder: (BuildContext c, Widget? w) {
        return ScrollConfiguration(
          behavior: const NoGlowScrollBehavior(),
          child: w!,
        );
      },
      localizationsDelegates: AppLocalizations.localizationsDelegates,
      supportedLocales: AppLocalizations.supportedLocales,
    );
  }
}

class NoGlowScrollBehavior extends ScrollBehavior {
  const NoGlowScrollBehavior();

  @override
  Widget buildOverscrollIndicator(
    BuildContext context,
    Widget child,
    ScrollableDetails details,
  ) =>
      child;
}
762
likes
0
pub points
99%
popularity

Publisher

verified publisherfluttercandies.com

An image picker (also with videos and audio) for Flutter projects based on WeChat's UI, with full support for customization.

Repository (GitHub)
View/report issues

Topics

#picker #image #audio #video #wechat

License

unknown (license)

Dependencies

extended_image, flutter, photo_manager, photo_manager_image_provider, provider, video_player, visibility_detector, wechat_picker_library

More

Packages that depend on wechat_assets_picker