adaptive_theme_manager 0.0.2
adaptive_theme_manager: ^0.0.2 copied to clipboard
A Flutter package for managing adaptive themes seamlessly
import 'package:adaptive_theme_manager/adaptive_theme_manager.dart';
import 'package:flutter/material.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
// Create an instance of AdaptiveThemeManager
final themeManager = AdaptiveThemeManager(
primaryColor: Colors.teal,
brightness: Brightness.light,
customButtonTheme: ButtonThemeData()
);
return AdaptiveThemeProvider(
themeManager: themeManager,
child: const HomeScreen(),
);
}
}
class HomeScreen extends StatelessWidget {
const HomeScreen({super.key});
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: const Text('Adaptive Theme Example'),
),
body: Center(
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
const Text('Hello, Adaptive Theme!'),
const SizedBox(height: 16),
ElevatedButton(
onPressed: () {
// Add some functionality for the button
},
child: const Text('Click Me'),
),
],
),
),
);
}
}