theme_button 1.0.0 copy "theme_button: ^1.0.0" to clipboard
theme_button: ^1.0.0 copied to clipboard

outdated

Theme button provides a switch widget for night/light modes

example/lib/main.dart

import 'dart:developer';

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

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

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

  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      debugShowCheckedModeBanner: false,
      title: 'Flutter Demo',
      theme: ThemeData.dark(),
      home: const MyHomePage(),
    );
  }
}

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

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text('Demo'),
      ),
      body: Center(
        child: ThemeButton(
          onChanged: (value) {
            log('$value');
          },
        ),
      ),
    );
  }
}
12
likes
0
points
4
downloads

Publisher

unverified uploader

Weekly Downloads

Theme button provides a switch widget for night/light modes

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter, lottie

More

Packages that depend on theme_button