Update flatbutton UI, fixed #18.
This commit is contained in:
parent
7d873062ec
commit
d99e7a2e04
|
@ -62,7 +62,8 @@ class MyApp extends StatelessWidget {
|
|||
textSelectionHandleColor: setting.accentSetColor,
|
||||
toggleableActiveColor: setting.accentSetColor,
|
||||
buttonTheme: ButtonThemeData(
|
||||
hoverColor: setting.accentSetColor.withAlpha(70))),
|
||||
hoverColor: setting.accentSetColor.withAlpha(70),
|
||||
splashColor: setting.accentSetColor.withAlpha(70))),
|
||||
darkTheme: ThemeData.dark().copyWith(
|
||||
accentColor: setting.accentSetColor,
|
||||
primaryColorDark: Colors.grey[800],
|
||||
|
|
|
@ -585,7 +585,7 @@ class _PodcastDetailState extends State<PodcastDetail> {
|
|||
transitionDuration: const Duration(milliseconds: 200),
|
||||
pageBuilder:
|
||||
(context, animaiton, secondaryAnimation) =>
|
||||
SearchEpisdoe(
|
||||
SearchEpisode(
|
||||
onSearch: (query) {
|
||||
setState(() {
|
||||
_query = query;
|
||||
|
@ -951,14 +951,14 @@ class _AboutPodcastState extends State<AboutPodcast> {
|
|||
}
|
||||
}
|
||||
|
||||
class SearchEpisdoe extends StatefulWidget {
|
||||
SearchEpisdoe({this.onSearch, Key key}) : super(key: key);
|
||||
class SearchEpisode extends StatefulWidget {
|
||||
SearchEpisode({this.onSearch, Key key}) : super(key: key);
|
||||
final ValueChanged<String> onSearch;
|
||||
@override
|
||||
_SearchEpisodeState createState() => _SearchEpisodeState();
|
||||
}
|
||||
|
||||
class _SearchEpisodeState extends State<SearchEpisdoe> {
|
||||
class _SearchEpisodeState extends State<SearchEpisode> {
|
||||
TextEditingController _controller;
|
||||
String _query;
|
||||
|
||||
|
@ -990,26 +990,26 @@ class _SearchEpisodeState extends State<SearchEpisdoe> {
|
|||
borderRadius: BorderRadius.all(Radius.circular(10))),
|
||||
elevation: 1,
|
||||
contentPadding: const EdgeInsets.symmetric(horizontal: 20),
|
||||
titlePadding:
|
||||
const EdgeInsets.only(top: 20, left: 20, right: 20, bottom: 20),
|
||||
actionsPadding: EdgeInsets.all(0),
|
||||
titlePadding: const EdgeInsets.all(20),
|
||||
actionsPadding: EdgeInsets.zero,
|
||||
actions: <Widget>[
|
||||
FlatButton(
|
||||
splashColor: context.accentColor.withAlpha(70),
|
||||
onPressed: () => Navigator.of(context).pop(),
|
||||
child: Text(
|
||||
s.cancel,
|
||||
textAlign: TextAlign.end,
|
||||
style: TextStyle(color: Colors.grey[600]),
|
||||
),
|
||||
),
|
||||
FlatButton(
|
||||
onPressed: (_query != null && _query != '')
|
||||
? () {
|
||||
{
|
||||
widget.onSearch(_query);
|
||||
Navigator.of(context).pop();
|
||||
}
|
||||
}
|
||||
: null,
|
||||
splashColor: context.accentColor.withAlpha(70),
|
||||
onPressed: () {
|
||||
if ((_query ?? '').isNotEmpty) {
|
||||
widget.onSearch(_query);
|
||||
Navigator.of(context).pop();
|
||||
}
|
||||
},
|
||||
child:
|
||||
Text(s.confirm, style: TextStyle(color: context.accentColor)),
|
||||
)
|
||||
|
@ -1038,7 +1038,7 @@ class _SearchEpisodeState extends State<SearchEpisdoe> {
|
|||
maxLines: 1,
|
||||
controller: _controller,
|
||||
onChanged: (value) {
|
||||
_query = value;
|
||||
setState(() => _query = value);
|
||||
},
|
||||
),
|
||||
],
|
||||
|
|
|
@ -406,6 +406,8 @@ class __PodcastCardState extends State<_PodcastCard>
|
|||
),
|
||||
actions: <Widget>[
|
||||
FlatButton(
|
||||
splashColor: context.accentColor
|
||||
.withAlpha(70),
|
||||
onPressed: () {
|
||||
Navigator.of(context).pop();
|
||||
_seconds = 0;
|
||||
|
@ -417,6 +419,8 @@ class __PodcastCardState extends State<_PodcastCard>
|
|||
),
|
||||
),
|
||||
FlatButton(
|
||||
splashColor: context.accentColor
|
||||
.withAlpha(70),
|
||||
onPressed: () {
|
||||
Navigator.of(context).pop();
|
||||
_saveSkipSeconds(
|
||||
|
@ -448,6 +452,8 @@ class __PodcastCardState extends State<_PodcastCard>
|
|||
content: Text(s.removePodcastDes),
|
||||
actions: <Widget>[
|
||||
FlatButton(
|
||||
splashColor:
|
||||
context.accentColor.withAlpha(70),
|
||||
onPressed: () =>
|
||||
Navigator.of(context).pop(),
|
||||
child: Text(
|
||||
|
@ -457,6 +463,8 @@ class __PodcastCardState extends State<_PodcastCard>
|
|||
),
|
||||
),
|
||||
FlatButton(
|
||||
splashColor:
|
||||
context.accentColor.withAlpha(70),
|
||||
onPressed: () {
|
||||
groupList.removePodcast(
|
||||
widget.podcastLocal.id);
|
||||
|
@ -527,6 +535,7 @@ class _RenameGroupState extends State<RenameGroup> {
|
|||
actionsPadding: EdgeInsets.all(0),
|
||||
actions: <Widget>[
|
||||
FlatButton(
|
||||
splashColor: context.accentColor.withAlpha(70),
|
||||
onPressed: () => Navigator.of(context).pop(),
|
||||
child: Text(
|
||||
s.cancel,
|
||||
|
@ -534,6 +543,7 @@ class _RenameGroupState extends State<RenameGroup> {
|
|||
),
|
||||
),
|
||||
FlatButton(
|
||||
splashColor: context.accentColor.withAlpha(70),
|
||||
onPressed: () async {
|
||||
if (list.contains(_newName)) {
|
||||
setState(() => _error = 1);
|
||||
|
|
|
@ -447,6 +447,9 @@ class _PodcastManageState extends State<PodcastManage>
|
|||
s.groupRemoveConfirm),
|
||||
actions: <Widget>[
|
||||
FlatButton(
|
||||
splashColor: context
|
||||
.accentColor
|
||||
.withAlpha(70),
|
||||
onPressed: () =>
|
||||
Navigator.of(context)
|
||||
.pop(),
|
||||
|
@ -458,6 +461,9 @@ class _PodcastManageState extends State<PodcastManage>
|
|||
),
|
||||
),
|
||||
FlatButton(
|
||||
splashColor: context
|
||||
.accentColor
|
||||
.withAlpha(70),
|
||||
onPressed: () {
|
||||
if (_index ==
|
||||
groupList.groups
|
||||
|
@ -605,6 +611,7 @@ class _AddGroupState extends State<AddGroup> {
|
|||
actionsPadding: EdgeInsets.all(0),
|
||||
actions: <Widget>[
|
||||
FlatButton(
|
||||
splashColor: context.accentColor.withAlpha(70),
|
||||
onPressed: () => Navigator.of(context).pop(),
|
||||
child: Text(
|
||||
s.cancel,
|
||||
|
@ -612,6 +619,7 @@ class _AddGroupState extends State<AddGroup> {
|
|||
),
|
||||
),
|
||||
FlatButton(
|
||||
splashColor: context.accentColor.withAlpha(70),
|
||||
onPressed: () async {
|
||||
if (list.contains(_newGroup)) {
|
||||
setState(() => _error = 1);
|
||||
|
|
|
@ -72,6 +72,7 @@ class _PodcastSettingState extends State<PodcastSetting> {
|
|||
content: Text(context.s.markConfirmContent),
|
||||
actions: <Widget>[
|
||||
FlatButton(
|
||||
splashColor: context.accentColor.withAlpha(70),
|
||||
onPressed: () {
|
||||
Navigator.of(context).pop();
|
||||
},
|
||||
|
@ -81,6 +82,7 @@ class _PodcastSettingState extends State<PodcastSetting> {
|
|||
),
|
||||
),
|
||||
FlatButton(
|
||||
splashColor: context.accentColor.withAlpha(70),
|
||||
onPressed: () async {
|
||||
Navigator.of(context).pop();
|
||||
await _markListened(widget.podcastLocal.id);
|
||||
|
@ -238,6 +240,7 @@ class _PodcastSettingState extends State<PodcastSetting> {
|
|||
),
|
||||
actions: <Widget>[
|
||||
FlatButton(
|
||||
splashColor: context.accentColor.withAlpha(70),
|
||||
onPressed: () {
|
||||
Navigator.of(context).pop();
|
||||
_seconds = 0;
|
||||
|
@ -248,6 +251,7 @@ class _PodcastSettingState extends State<PodcastSetting> {
|
|||
),
|
||||
),
|
||||
FlatButton(
|
||||
splashColor: context.accentColor.withAlpha(70),
|
||||
onPressed: () {
|
||||
Navigator.of(context).pop();
|
||||
_saveSkipSeconds(_seconds);
|
||||
|
|
|
@ -54,6 +54,7 @@ class _AboutPodcastState extends State<AboutPodcast> {
|
|||
top: 20, left: 20, right: context.width / 3, bottom: 20),
|
||||
actions: <Widget>[
|
||||
FlatButton(
|
||||
splashColor: context.accentColor.withAlpha(70),
|
||||
padding: EdgeInsets.all(10.0),
|
||||
onPressed: () {
|
||||
_groupList.removePodcast(widget.podcastLocal.id);
|
||||
|
|
Loading…
Reference in New Issue