https://github.com/memishood/theme_button
Theme button provides a toggle widget for night/light modes
https://github.com/memishood/theme_button
dark-mode flutter-theme light-mode theme-toggle toggle toggle-buttons toggle-switches
Last synced: 5 days ago
JSON representation
Theme button provides a toggle widget for night/light modes
- Host: GitHub
- URL: https://github.com/memishood/theme_button
- Owner: memishood
- License: apache-2.0
- Created: 2022-07-20T21:31:33.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2022-09-12T14:18:17.000Z (almost 4 years ago)
- Last Synced: 2026-05-27T02:11:52.748Z (about 2 months ago)
- Topics: dark-mode, flutter-theme, light-mode, theme-toggle, toggle, toggle-buttons, toggle-switches
- Language: C++
- Homepage:
- Size: 456 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# ThemeButton
https://pub.dev/packages/theme_button
It ensures a switch widget for Night/Light theme modes

## Add Dependency
```yaml
dependencies:
flutter:
sdk: flutter
# add theme_button
theme_button: ^{latest version}
```
## Get Started
```dart
import 'package:theme_button/theme_button.dart';
ThemeButton(
onChanged: (bool value) {
// do stuff
},
),
```
### Property
| Property | Type | Default Value | Description |
| --------------- | ------------ | ------------------------ | --------------------------------------------------------------------------- |
| width | double | 72 | The width of the view |
| height | double | 72 | The height of the view |
| padding | EdgeInsets | EdgeInsets.zero | Animation padding |
| duration | Duration | 1 seconds | Animation speed |
| onChanged | Fun(value) | null | It'll be called when the switch has been changed by the user |