flutter_settings_ui 2.0.0 flutter_settings_ui: ^2.0.0 copied to clipboard
Fork of settings_ui. Create native settings for Flutter app in minutes.
import 'package:device_preview/device_preview.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'screens/settings_screen.dart';
void main() {
runApp(
DevicePreview(
enabled: kIsWeb ? false : !kReleaseMode,
builder: (_) => const MyApp(),
),
);
}
class MyApp extends StatelessWidget {
const MyApp({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return MaterialApp(
locale: DevicePreview.locale(context),
builder: DevicePreview.appBuilder,
debugShowCheckedModeBanner: false,
title: 'Settings UI Demo',
theme: ThemeData(
primarySwatch: Colors.deepOrange,
brightness: Brightness.light,
),
darkTheme: ThemeData(
colorScheme: ColorScheme.fromSwatch(
primarySwatch: Colors.deepPurple, brightness: Brightness.dark)
.copyWith(secondary: Colors.deepPurple),
),
home: const SettingsScreen(),
);
}
}