flutter_drawable_mipmap 2.0.0
flutter_drawable_mipmap: ^2.0.0 copied to clipboard
Show native images in Flutter. Android drawables and mipmaps, iOS asset catalog images, system icons (SF Symbols) and the app icon.
import 'package:material_ui/material_ui.dart';
import 'home_page.dart';
void main() => runApp(const ExampleApp());
class ExampleApp extends StatefulWidget {
const ExampleApp({super.key});
@override
State<ExampleApp> createState() => _ExampleAppState();
}
class _ExampleAppState extends State<ExampleApp> {
ThemeMode _themeMode = ThemeMode.light;
void _toggleTheme() {
setState(() {
_themeMode = _themeMode == ThemeMode.light
? ThemeMode.dark
: ThemeMode.light;
});
}
@override
Widget build(BuildContext context) {
return MaterialApp(
title: "Flutter Drawable Mipmap",
debugShowCheckedModeBanner: false,
theme: ThemeData(colorSchemeSeed: Colors.deepPurple),
darkTheme: ThemeData(
colorSchemeSeed: Colors.deepPurple,
brightness: Brightness.dark,
),
themeMode: _themeMode,
home: HomePage(
isDark: _themeMode == ThemeMode.dark,
onToggleTheme: _toggleTheme,
),
);
}
}