rand dart fix
This commit is contained in:
@@ -74,7 +74,7 @@ class LayoutExample extends StatelessWidget {
|
||||
),
|
||||
floatingActionButton: FloatingActionButton(
|
||||
child: Icon(Icons.add),
|
||||
backgroundColor: Theme.of(context).accentColor,
|
||||
backgroundColor: Theme.of(context).colorScheme.secondary,
|
||||
onPressed: () {},
|
||||
),
|
||||
);
|
||||
|
||||
@@ -53,7 +53,7 @@ class _ListExampleState extends State<ListExample> {
|
||||
title: Text("App Bar"),
|
||||
),
|
||||
],
|
||||
itemCount: _items?.length ?? 0,
|
||||
itemCount: _items.length ?? 0,
|
||||
itemBuilder: (BuildContext context, int index) {
|
||||
final i = _items[index];
|
||||
return ListTile(
|
||||
|
||||
@@ -22,16 +22,14 @@ void _setTargetPlatformForDesktop() {
|
||||
} else if (Platform.isLinux || Platform.isWindows) {
|
||||
targetPlatform = TargetPlatform.android;
|
||||
}
|
||||
if (targetPlatform != null) {
|
||||
debugDefaultTargetPlatformOverride = targetPlatform;
|
||||
}
|
||||
debugDefaultTargetPlatformOverride = targetPlatform;
|
||||
}
|
||||
|
||||
class MyApp extends StatelessWidget {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return MaterialApp(
|
||||
theme: ThemeData.light().copyWith(accentColor: Colors.red),
|
||||
theme: ThemeData.light().copyWith(colorScheme: ColorScheme.fromSwatch().copyWith(secondary: Colors.red)),
|
||||
debugShowCheckedModeBanner: false,
|
||||
home: HomePage(),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user