Skip to content

Commit

Permalink
Update the UI to material3
Browse files Browse the repository at this point in the history
  • Loading branch information
flofriday committed Nov 26, 2022
1 parent 86d2a82 commit 2e9f13c
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 7 deletions.
7 changes: 4 additions & 3 deletions lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,18 @@ class App extends StatelessWidget {
title: 'TU Addressbook',
locale: Locale('en'),
theme: ThemeData(
useMaterial3: true,
brightness: Brightness.light,
appBarTheme:
AppBarTheme(systemOverlayStyle: SystemUiOverlayStyle.light),
appBarTheme: AppBarTheme(systemOverlayStyle: SystemUiOverlayStyle.dark),
primarySwatch: Colors.indigo,
scaffoldBackgroundColor: Colors.indigo[50],
//scaffoldBackgroundColor: Colors.indigo[50],
cardTheme: CardTheme(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.all(Radius.circular(10))),
),
),
darkTheme: ThemeData(
useMaterial3: true,
brightness: Brightness.dark,
primarySwatch: Colors.blue,
//scaffoldBackgroundColor: Colors.blueGrey[50],
Expand Down
15 changes: 11 additions & 4 deletions lib/screens/image_screen.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';

class ImageScreen extends StatelessWidget {
final String _imageUrl;
Expand All @@ -11,14 +12,20 @@ class ImageScreen extends StatelessWidget {
return Scaffold(
backgroundColor: Colors.black,
appBar: AppBar(
foregroundColor: Colors.black,
backgroundColor: Color.fromARGB(0xAA, 0x00, 0x00, 0x00),
foregroundColor: Colors.white,
backgroundColor: Colors.black,
systemOverlayStyle: SystemUiOverlayStyle.light,
elevation: 0,
title: Text(
_title,
style: TextStyle(color: Colors.white),
),
iconTheme: IconThemeData(color: Colors.white),

// FIXME: this shouldn't be necessary but I couldn't get the color
// to work any other way.
leading: IconButton(
icon: Icon(Icons.arrow_back, color: Colors.white),
onPressed: () => Navigator.of(context).pop(),
),
),
body: InteractiveViewer(
clipBehavior: Clip.none,
Expand Down

0 comments on commit 2e9f13c

Please sign in to comment.