mirror of
https://github.com/stonega/tsacdop
synced 2025-02-17 20:10:37 +01:00
Change button theme height.
This commit is contained in:
parent
01d21940d4
commit
1c98c0ae0f
@ -1277,7 +1277,7 @@ class _ControlPanelState extends State<ControlPanel>
|
||||
onPressed:
|
||||
playing ? () => audio.rewind() : null,
|
||||
iconSize: 32.0,
|
||||
icon: Icon(Icons.replay),
|
||||
icon: Icon(Icons.fast_rewind),
|
||||
color: Colors.grey[500]),
|
||||
Container(
|
||||
margin: EdgeInsets.symmetric(horizontal: 30),
|
||||
@ -1345,7 +1345,7 @@ class _ControlPanelState extends State<ControlPanel>
|
||||
onPressed:
|
||||
playing ? () => audio.fastForward() : null,
|
||||
iconSize: 32.0,
|
||||
icon: Icon(Icons.forward),
|
||||
icon: Icon(Icons.fast_forward),
|
||||
color: Colors.grey[500]),
|
||||
],
|
||||
),
|
||||
|
@ -175,132 +175,149 @@ class _RssResultState extends State<RssResult> {
|
||||
length: 2,
|
||||
child: Column(
|
||||
children: [
|
||||
SizedBox(
|
||||
height: 140,
|
||||
child: Row(
|
||||
children: [
|
||||
Expanded(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.only(left: 20),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(vertical: 8),
|
||||
child: Text(_onlinePodcast.title,
|
||||
maxLines: 2,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
style: context.textTheme.headline5),
|
||||
ListView(
|
||||
physics: const NeverScrollableScrollPhysics(),
|
||||
children: [
|
||||
SizedBox(
|
||||
height: 140,
|
||||
child: Row(
|
||||
children: [
|
||||
Expanded(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.only(left: 20),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(vertical: 8),
|
||||
child: Text(_onlinePodcast.title,
|
||||
maxLines: 2,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
style: context.textTheme.headline5),
|
||||
),
|
||||
!_isSubscribed
|
||||
? OutlineButton(
|
||||
highlightedBorderColor: context.accentColor,
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius:
|
||||
BorderRadius.circular(100.0),
|
||||
side: BorderSide(
|
||||
color: context.accentColor)),
|
||||
splashColor:
|
||||
context.accentColor.withOpacity(0.5),
|
||||
child: Text(s.subscribe,
|
||||
style: TextStyle(
|
||||
color: context.accentColor)),
|
||||
onPressed: () {
|
||||
_subscribePodcast(_onlinePodcast);
|
||||
setState(() {
|
||||
_isSubscribed = true;
|
||||
});
|
||||
Fluttertoast.showToast(
|
||||
msg: s.podcastSubscribed,
|
||||
gravity: ToastGravity.BOTTOM,
|
||||
);
|
||||
})
|
||||
: OutlineButton(
|
||||
color: context.accentColor.withOpacity(0.5),
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius:
|
||||
BorderRadius.circular(100.0),
|
||||
side: BorderSide(
|
||||
color: Colors.grey[500])),
|
||||
highlightedBorderColor: Colors.grey[500],
|
||||
disabledTextColor: Colors.grey[500],
|
||||
child: Text(s.subscribe),
|
||||
disabledBorderColor: Colors.grey[500],
|
||||
onPressed: () {})
|
||||
],
|
||||
),
|
||||
!_isSubscribed
|
||||
? OutlineButton(
|
||||
highlightedBorderColor: context.accentColor,
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(100.0),
|
||||
side:
|
||||
BorderSide(color: context.accentColor)),
|
||||
splashColor:
|
||||
context.accentColor.withOpacity(0.5),
|
||||
child: Text(s.subscribe,
|
||||
style:
|
||||
TextStyle(color: context.accentColor)),
|
||||
onPressed: () {
|
||||
_subscribePodcast(_onlinePodcast);
|
||||
setState(() {
|
||||
_isSubscribed = true;
|
||||
});
|
||||
Fluttertoast.showToast(
|
||||
msg: s.podcastSubscribed,
|
||||
gravity: ToastGravity.BOTTOM,
|
||||
);
|
||||
})
|
||||
: OutlineButton(
|
||||
color: context.accentColor.withOpacity(0.5),
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(100.0),
|
||||
side: BorderSide(color: Colors.grey[500])),
|
||||
highlightedBorderColor: Colors.grey[500],
|
||||
disabledTextColor: Colors.grey[500],
|
||||
child: Text(s.subscribe),
|
||||
disabledBorderColor: Colors.grey[500],
|
||||
onPressed: () {})
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
CachedNetworkImage(
|
||||
height: 120.0,
|
||||
width: 120.0,
|
||||
fit: BoxFit.fitWidth,
|
||||
alignment: Alignment.center,
|
||||
imageUrl: _onlinePodcast.image,
|
||||
progressIndicatorBuilder: (context, url, downloadProgress) =>
|
||||
Container(
|
||||
height: 120,
|
||||
width: 120,
|
||||
alignment: Alignment.center,
|
||||
color: context.primaryColorDark,
|
||||
child: SizedBox(
|
||||
width: 40,
|
||||
height: 2,
|
||||
child: LinearProgressIndicator(
|
||||
value: downloadProgress.progress),
|
||||
),
|
||||
),
|
||||
errorWidget: (context, url, error) => Container(
|
||||
width: 120,
|
||||
height: 120,
|
||||
CachedNetworkImage(
|
||||
height: 120.0,
|
||||
width: 120.0,
|
||||
fit: BoxFit.fitWidth,
|
||||
alignment: Alignment.center,
|
||||
color: context.primaryColorDark,
|
||||
child: Icon(Icons.error)),
|
||||
imageUrl: _onlinePodcast.image,
|
||||
progressIndicatorBuilder:
|
||||
(context, url, downloadProgress) => Container(
|
||||
height: 120,
|
||||
width: 120,
|
||||
alignment: Alignment.center,
|
||||
color: context.primaryColorDark,
|
||||
child: SizedBox(
|
||||
width: 40,
|
||||
height: 2,
|
||||
child: LinearProgressIndicator(
|
||||
value: downloadProgress.progress),
|
||||
),
|
||||
),
|
||||
errorWidget: (context, url, error) => Container(
|
||||
width: 120,
|
||||
height: 120,
|
||||
alignment: Alignment.center,
|
||||
color: context.primaryColorDark,
|
||||
child: Icon(Icons.error)),
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
Container(
|
||||
height: 50,
|
||||
color: context.scaffoldBackgroundColor,
|
||||
child: TabBar(
|
||||
indicatorColor: context.accentColor,
|
||||
labelColor: context.textColor,
|
||||
indicatorWeight: 3,
|
||||
indicatorSize: TabBarIndicatorSize.label,
|
||||
tabs: [
|
||||
Text(s.homeToprightMenuAbout),
|
||||
Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
Text(s.episode(2)),
|
||||
SizedBox(width: 2),
|
||||
Container(
|
||||
padding: const EdgeInsets.only(
|
||||
left: 5, right: 5, top: 2, bottom: 2),
|
||||
decoration: BoxDecoration(
|
||||
color: context.accentColor,
|
||||
borderRadius: BorderRadius.circular(100)),
|
||||
child: Text(_onlinePodcast.count.toString(),
|
||||
style: TextStyle(color: Colors.white)))
|
||||
],
|
||||
)
|
||||
]),
|
||||
ListView(
|
||||
physics: const NeverScrollableScrollPhysics(),
|
||||
children: [
|
||||
Container(
|
||||
height: 50,
|
||||
color: context.scaffoldBackgroundColor,
|
||||
child: TabBar(
|
||||
indicatorColor: context.accentColor,
|
||||
labelColor: context.textColor,
|
||||
indicatorWeight: 3,
|
||||
indicatorSize: TabBarIndicatorSize.label,
|
||||
tabs: [
|
||||
Text(s.homeToprightMenuAbout),
|
||||
Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
Text(s.episode(2)),
|
||||
SizedBox(width: 2),
|
||||
Container(
|
||||
padding: const EdgeInsets.only(
|
||||
left: 5, right: 5, top: 2, bottom: 2),
|
||||
decoration: BoxDecoration(
|
||||
color: context.accentColor,
|
||||
borderRadius: BorderRadius.circular(100)),
|
||||
child: Text(_onlinePodcast.count.toString(),
|
||||
style: TextStyle(color: Colors.white)))
|
||||
],
|
||||
)
|
||||
]),
|
||||
),
|
||||
],
|
||||
),
|
||||
Expanded(
|
||||
child: TabBarView(children: [
|
||||
ListView(
|
||||
children: [
|
||||
Html(
|
||||
onLinkTap: (url) {
|
||||
url.launchUrl;
|
||||
},
|
||||
linkStyle: TextStyle(
|
||||
color: context.accentColor,
|
||||
// decoration: TextDecoration.underline,
|
||||
textBaseline: TextBaseline.ideographic),
|
||||
shrinkToFit: true,
|
||||
data: _onlinePodcast.description,
|
||||
padding: EdgeInsets.only(left: 20.0, right: 20, bottom: 20),
|
||||
defaultTextStyle: TextStyle(
|
||||
height: 1.8,
|
||||
Align(
|
||||
alignment: Alignment.topLeft,
|
||||
child: Html(
|
||||
onLinkTap: (url) {
|
||||
url.launchUrl;
|
||||
},
|
||||
linkStyle: TextStyle(
|
||||
color: context.accentColor,
|
||||
// decoration: TextDecoration.underline,
|
||||
textBaseline: TextBaseline.ideographic),
|
||||
shrinkToFit: true,
|
||||
data: _onlinePodcast.description,
|
||||
padding:
|
||||
EdgeInsets.only(left: 20.0, right: 20, bottom: 20),
|
||||
defaultTextStyle: TextStyle(
|
||||
height: 1.8,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
|
@ -257,27 +257,30 @@ class _DataBackupState extends State<DataBackup> {
|
||||
await _shareFile(file);
|
||||
}),
|
||||
SizedBox(width: 10),
|
||||
OutlineButton(
|
||||
highlightedBorderColor: Colors.red[700],
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(100.0),
|
||||
side: BorderSide(color: Colors.red[700])),
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
Icon(
|
||||
LineIcons.paperclip_solid,
|
||||
size: context.textTheme.headline6.fontSize,
|
||||
color: Colors.red[700],
|
||||
),
|
||||
SizedBox(width: 10),
|
||||
Text(s.import,
|
||||
style: TextStyle(color: Colors.red[700])),
|
||||
],
|
||||
),
|
||||
onPressed: () {
|
||||
_getFilePath(context);
|
||||
}),
|
||||
ButtonTheme(
|
||||
height: 32,
|
||||
child: OutlineButton(
|
||||
highlightedBorderColor: Colors.red[700],
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(100.0),
|
||||
side: BorderSide(color: Colors.red[700])),
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
Icon(
|
||||
LineIcons.paperclip_solid,
|
||||
size: context.textTheme.headline6.fontSize,
|
||||
color: Colors.red[700],
|
||||
),
|
||||
SizedBox(width: 10),
|
||||
Text(s.import,
|
||||
style: TextStyle(color: Colors.red[700])),
|
||||
],
|
||||
),
|
||||
onPressed: () {
|
||||
_getFilePath(context);
|
||||
}),
|
||||
),
|
||||
]),
|
||||
),
|
||||
Divider()
|
||||
|
@ -56,25 +56,25 @@ void callbackDispatcher() {
|
||||
}
|
||||
|
||||
ThemeData lightTheme = ThemeData(
|
||||
accentColorBrightness: Brightness.dark,
|
||||
primaryColor: Colors.grey[100],
|
||||
// accentColor: _accentSetColor,
|
||||
primaryColorLight: Colors.white,
|
||||
primaryColorDark: Colors.grey[300],
|
||||
dialogBackgroundColor: Colors.white,
|
||||
backgroundColor: Colors.grey[100],
|
||||
appBarTheme: AppBarTheme(
|
||||
color: Colors.grey[100],
|
||||
elevation: 0,
|
||||
),
|
||||
textTheme: TextTheme(
|
||||
bodyText2: TextStyle(fontSize: 15.0, fontWeight: FontWeight.normal),
|
||||
),
|
||||
tabBarTheme: TabBarTheme(
|
||||
labelColor: Colors.black,
|
||||
unselectedLabelColor: Colors.grey[400],
|
||||
),
|
||||
);
|
||||
accentColorBrightness: Brightness.dark,
|
||||
primaryColor: Colors.grey[100],
|
||||
// accentColor: _accentSetColor,
|
||||
primaryColorLight: Colors.white,
|
||||
primaryColorDark: Colors.grey[300],
|
||||
dialogBackgroundColor: Colors.white,
|
||||
backgroundColor: Colors.grey[100],
|
||||
appBarTheme: AppBarTheme(
|
||||
color: Colors.grey[100],
|
||||
elevation: 0,
|
||||
),
|
||||
textTheme: TextTheme(
|
||||
bodyText2: TextStyle(fontSize: 15.0, fontWeight: FontWeight.normal),
|
||||
),
|
||||
tabBarTheme: TabBarTheme(
|
||||
labelColor: Colors.black,
|
||||
unselectedLabelColor: Colors.grey[400],
|
||||
),
|
||||
buttonTheme: ButtonThemeData(height: 32));
|
||||
|
||||
class SettingState extends ChangeNotifier {
|
||||
var themeStorage = KeyValueStorage(themesKey);
|
||||
|
Loading…
x
Reference in New Issue
Block a user