apptomate_custom_checkbox 0.0.1 copy "apptomate_custom_checkbox: ^0.0.1" to clipboard
apptomate_custom_checkbox: ^0.0.1 copied to clipboard

A customizable checkbox widget for Flutter that allows you to define custom check icons, colors, and styles.

example/lib/main.dart

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

void main() {
  runApp(const MyApp());
}

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

  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      debugShowCheckedModeBanner: false,
      theme: ThemeData(
        colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
        useMaterial3: true,
      ),
      home: MyHomePage(),
    );
  }
}

class MyHomePage extends StatefulWidget {
  const MyHomePage({super.key});

  @override
  _CustomCheckboxExampleState createState() => _CustomCheckboxExampleState();
}

class _CustomCheckboxExampleState extends State<MyHomePage> {
  bool isChecked = false;
  bool isChecked2 = false;

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: SafeArea(
        child: Center(
          child: Column(
            crossAxisAlignment: CrossAxisAlignment.start,
            children: [
              CustomCheckbox(
                value: isChecked,
                onChanged: (newValue) {
                  setState(() {
                    isChecked = newValue;
                  });
                },
                label: "Subscribe to Newsletter",
                activeColor: Colors.green,
                borderRadius: 0,
                padding: EdgeInsets.symmetric(vertical: 10, horizontal: 15),
              ),
              CustomCheckbox(
                value: isChecked2,
                onChanged: (newValue) {
                  setState(() {
                    isChecked2 = newValue;
                  });
                },
                label: "Accept Terms&Conditions",
                activeColor: Colors.blueAccent,
                borderRadius: 8,
                padding: EdgeInsets.symmetric(vertical: 10, horizontal: 15),
              ),
            ],
          ),
        ),
      ),
    );
  }
}
0
likes
150
points
144
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

A customizable checkbox widget for Flutter that allows you to define custom check icons, colors, and styles.

Homepage

License

MIT (license)

Dependencies

flutter

More

Packages that depend on apptomate_custom_checkbox