assets_picker 1.0.2 copy "assets_picker: ^1.0.2" to clipboard
assets_picker: ^1.0.2 copied to clipboard

discontinued

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

example/lib/main.dart

// Copyright 2019 The bongochat 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:assets_picker/assets_picker.dart';
import 'package:assets_picker_demo/l10n/gen/app_localizations.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.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;
}
6
likes
0
pub points
25%
popularity

Publisher

verified publisherbongo.chat

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

Repository (GitHub)
View/report issues

Topics

#picker #image #audio #video #bongochat

License

unknown (license)

Dependencies

extended_image, flutter, photo_manager, photo_manager_image_provider, provider, video_player

More

Packages that depend on assets_picker