mirror of
https://github.com/flutter/samples.git
synced 2025-11-09 06:18:49 +00:00
[platform_design]Fix problems in dark mode (#377)
This commit is contained in:
committed by
GitHub
parent
f8e3d391f3
commit
3a02748df2
@@ -20,6 +20,7 @@ class MyAdaptingApp extends StatelessWidget {
|
|||||||
// Use the green theme for Material widgets.
|
// Use the green theme for Material widgets.
|
||||||
primarySwatch: Colors.green,
|
primarySwatch: Colors.green,
|
||||||
),
|
),
|
||||||
|
darkTheme: ThemeData.dark(),
|
||||||
builder: (context, child) {
|
builder: (context, child) {
|
||||||
return CupertinoTheme(
|
return CupertinoTheme(
|
||||||
// Instead of letting Cupertino widgets auto-adapt to the Material
|
// Instead of letting Cupertino widgets auto-adapt to the Material
|
||||||
|
|||||||
@@ -96,7 +96,6 @@ class _NewsTabState extends State<NewsTab> {
|
|||||||
title: Text(NewsTab.title),
|
title: Text(NewsTab.title),
|
||||||
),
|
),
|
||||||
body: Container(
|
body: Container(
|
||||||
color: Colors.grey[100],
|
|
||||||
child: ListView.builder(
|
child: ListView.builder(
|
||||||
itemBuilder: _listBuilder,
|
itemBuilder: _listBuilder,
|
||||||
),
|
),
|
||||||
@@ -107,12 +106,9 @@ class _NewsTabState extends State<NewsTab> {
|
|||||||
Widget _buildIos(BuildContext context) {
|
Widget _buildIos(BuildContext context) {
|
||||||
return CupertinoPageScaffold(
|
return CupertinoPageScaffold(
|
||||||
navigationBar: CupertinoNavigationBar(),
|
navigationBar: CupertinoNavigationBar(),
|
||||||
child: Container(
|
|
||||||
color: Colors.grey[100],
|
|
||||||
child: ListView.builder(
|
child: ListView.builder(
|
||||||
itemBuilder: _listBuilder,
|
itemBuilder: _listBuilder,
|
||||||
),
|
),
|
||||||
),
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -222,7 +222,7 @@ class SongPlaceholderTile extends StatelessWidget {
|
|||||||
child: Row(
|
child: Row(
|
||||||
children: [
|
children: [
|
||||||
Container(
|
Container(
|
||||||
color: Colors.grey[400],
|
color: Theme.of(context).textTheme.body1.color,
|
||||||
width: 130,
|
width: 130,
|
||||||
),
|
),
|
||||||
Padding(
|
Padding(
|
||||||
@@ -235,27 +235,27 @@ class SongPlaceholderTile extends StatelessWidget {
|
|||||||
Container(
|
Container(
|
||||||
height: 9,
|
height: 9,
|
||||||
margin: EdgeInsets.only(right: 60),
|
margin: EdgeInsets.only(right: 60),
|
||||||
color: Colors.grey[300],
|
color: Theme.of(context).textTheme.body1.color,
|
||||||
),
|
),
|
||||||
Container(
|
Container(
|
||||||
height: 9,
|
height: 9,
|
||||||
margin: EdgeInsets.only(right: 20, top: 8),
|
margin: EdgeInsets.only(right: 20, top: 8),
|
||||||
color: Colors.grey[300],
|
color: Theme.of(context).textTheme.body1.color,
|
||||||
),
|
),
|
||||||
Container(
|
Container(
|
||||||
height: 9,
|
height: 9,
|
||||||
margin: EdgeInsets.only(right: 40, top: 8),
|
margin: EdgeInsets.only(right: 40, top: 8),
|
||||||
color: Colors.grey[300],
|
color: Theme.of(context).textTheme.body1.color,
|
||||||
),
|
),
|
||||||
Container(
|
Container(
|
||||||
height: 9,
|
height: 9,
|
||||||
margin: EdgeInsets.only(right: 80, top: 8),
|
margin: EdgeInsets.only(right: 80, top: 8),
|
||||||
color: Colors.grey[300],
|
color: Theme.of(context).textTheme.body1.color,
|
||||||
),
|
),
|
||||||
Container(
|
Container(
|
||||||
height: 9,
|
height: 9,
|
||||||
margin: EdgeInsets.only(right: 50, top: 8),
|
margin: EdgeInsets.only(right: 50, top: 8),
|
||||||
color: Colors.grey[300],
|
color: Theme.of(context).textTheme.body1.color,
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
@@ -325,6 +325,7 @@ void showChoices(BuildContext context, List<String> choices) {
|
|||||||
return SizedBox(
|
return SizedBox(
|
||||||
height: 250,
|
height: 250,
|
||||||
child: CupertinoPicker(
|
child: CupertinoPicker(
|
||||||
|
backgroundColor: Theme.of(context).canvasColor,
|
||||||
useMagnifier: true,
|
useMagnifier: true,
|
||||||
magnification: 1.1,
|
magnification: 1.1,
|
||||||
itemExtent: 40,
|
itemExtent: 40,
|
||||||
|
|||||||
Reference in New Issue
Block a user