-
Notifications
You must be signed in to change notification settings - Fork 233
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed 'trailing' when used 'SettingsTile.switchTile'.
Fixed color scheme on web version. Update WebChromeSettings in example.
- Loading branch information
Showing
7 changed files
with
112 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
53 changes: 53 additions & 0 deletions
53
example/lib/screens/gallery/web_chrome_addresses_settings.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
import 'package:flutter/material.dart'; | ||
import 'package:settings_ui/settings_ui.dart'; | ||
|
||
class WebChromeAddressesScreen extends StatefulWidget { | ||
WebChromeAddressesScreen({Key key}) : super(key: key); | ||
|
||
@override | ||
State<WebChromeAddressesScreen> createState() => | ||
_WebChromeAddressesScreenState(); | ||
} | ||
|
||
class _WebChromeAddressesScreenState extends State<WebChromeAddressesScreen> { | ||
bool _toggle = true; | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
return Scaffold( | ||
appBar: AppBar(title: Text('Addresses and more')), | ||
body: SettingsList( | ||
platform: DevicePlatform.web, | ||
sections: [ | ||
SettingsSection( | ||
margin: EdgeInsetsDirectional.only(top: 40), | ||
tiles: [ | ||
SettingsTile.switchTile( | ||
initialValue: _toggle, | ||
onToggle: (_) { | ||
setState(() { | ||
_toggle = _; | ||
}); | ||
}, | ||
trailing: Icon(Icons.info), | ||
title: Text('Save and fill addresses'), | ||
description: Text( | ||
'Include information like phone numbers, email, and shipping addresses'), | ||
), | ||
], | ||
), | ||
SettingsSection( | ||
title: Text('Addresses'), | ||
tiles: [ | ||
SettingsTile.navigation( | ||
onPressed: (_) {}, | ||
title: Text('Name, addresses'), | ||
trailing: Icon(Icons.more_vert), | ||
), | ||
], | ||
), | ||
], | ||
), | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters