Skip to content

Instantly share code, notes, and snippets.

@paldepind
Created November 12, 2023 12:41
Show Gist options
  • Save paldepind/cebcc9b724fa845cce296ce776b41e7f to your computer and use it in GitHub Desktop.
Save paldepind/cebcc9b724fa845cce296ce776b41e7f to your computer and use it in GitHub Desktop.
Material dark mode
import 'package:flutter/material.dart';
void main() => runApp(TestApp());
class TestApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Theme(
data: ThemeData(brightness: Brightness.dark),
child: Scaffold(
appBar: AppBar(
title: const Text('Test'),
),
body: const Center(
child: Column(children: [Text('Hello world!')]),
))));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment