color_picker_field 2.1.0 copy "color_picker_field: ^2.1.0" to clipboard
color_picker_field: ^2.1.0 copied to clipboard

Color Picker field for Material and Cupertino, including a Radial Color picker(Hue based)

example/lib/main.dart

import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_localizations/flutter_localizations.dart';

import 'cupertino_home_page.dart';
import 'home_page.dart';

// void main() => runApp(MyMaterialApp());
void main() => runApp(const MyCupertinoApp());

class MyCupertinoApp extends StatelessWidget {
  const MyCupertinoApp({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return const CupertinoApp(
      title: 'Color Picker',
      theme: CupertinoThemeData(
        primaryColor: CupertinoColors.activeOrange,
        brightness: Brightness.light,
      ),
      home: CupertinoHomePage(title: 'Color Picker Cupertino'),
      localizationsDelegates: [
        GlobalCupertinoLocalizations.delegate,
        GlobalMaterialLocalizations.delegate,
        GlobalWidgetsLocalizations.delegate
      ],
      locale: Locale('en_US'),
    );
  }
}

class MyMaterialApp extends StatelessWidget {
  const MyMaterialApp({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Color Picker',
      theme: ThemeData(
        primarySwatch: Colors.pink,
        brightness: Brightness.light,
      ),
      home: const MaterialHomePage(title: 'Color Picker Material'),
      localizationsDelegates: const [
        GlobalCupertinoLocalizations.delegate,
        GlobalMaterialLocalizations.delegate,
        GlobalWidgetsLocalizations.delegate
      ],
      locale: const Locale('en_US'),
    );
  }
}
16
likes
150
pub points
75%
popularity
screenshot

Publisher

unverified uploader

Color Picker field for Material and Cupertino, including a Radial Color picker(Hue based)

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

cupertino_icons, flutter, vector_math

More

Packages that depend on color_picker_field