Minor change.
This commit is contained in:
parent
133cbcd65f
commit
7c13058463
|
@ -123,6 +123,8 @@ class _HomeState extends State<Home> with SingleTickerProviderStateMixin {
|
||||||
Column(
|
Column(
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
Expanded(
|
Expanded(
|
||||||
|
child: ScrollConfiguration(
|
||||||
|
behavior: NoGrowBehavior(),
|
||||||
child: NestedScrollView(
|
child: NestedScrollView(
|
||||||
innerScrollPositionKeyBuilder: () {
|
innerScrollPositionKeyBuilder: () {
|
||||||
return Key('tab${_controller.index}');
|
return Key('tab${_controller.index}');
|
||||||
|
@ -152,8 +154,8 @@ class _HomeState extends State<Home> with SingleTickerProviderStateMixin {
|
||||||
child: IconButton(
|
child: IconButton(
|
||||||
tooltip: s.add,
|
tooltip: s.add,
|
||||||
splashRadius: 20,
|
splashRadius: 20,
|
||||||
icon:
|
icon: Icon(
|
||||||
Icon(Icons.add_circle_outline),
|
Icons.add_circle_outline),
|
||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
await showSearch<int>(
|
await showSearch<int>(
|
||||||
context: context,
|
context: context,
|
||||||
|
@ -177,7 +179,8 @@ class _HomeState extends State<Home> with SingleTickerProviderStateMixin {
|
||||||
image: Theme.of(context)
|
image: Theme.of(context)
|
||||||
.brightness ==
|
.brightness ==
|
||||||
Brightness.light
|
Brightness.light
|
||||||
? AssetImage('assets/text.png')
|
? AssetImage(
|
||||||
|
'assets/text.png')
|
||||||
: AssetImage(
|
: AssetImage(
|
||||||
'assets/text_light.png'),
|
'assets/text_light.png'),
|
||||||
height: 30,
|
height: 30,
|
||||||
|
@ -247,6 +250,7 @@ class _HomeState extends State<Home> with SingleTickerProviderStateMixin {
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
Selector<AudioPlayerNotifier, bool>(
|
Selector<AudioPlayerNotifier, bool>(
|
||||||
selector: (_, audio) => audio?.playerRunning ?? false,
|
selector: (_, audio) => audio?.playerRunning ?? false,
|
||||||
builder: (_, data, __) {
|
builder: (_, data, __) {
|
||||||
|
|
|
@ -120,8 +120,7 @@ class DiscoveryPageState extends State<DiscoveryPage> {
|
||||||
builder: (context, snapshot) {
|
builder: (context, snapshot) {
|
||||||
if (snapshot.hasData && snapshot.data.isNotEmpty) {
|
if (snapshot.hasData && snapshot.data.isNotEmpty) {
|
||||||
final history = snapshot.data;
|
final history = snapshot.data;
|
||||||
return SizedBox(
|
return Wrap(
|
||||||
child: Wrap(
|
|
||||||
direction: Axis.horizontal,
|
direction: Axis.horizontal,
|
||||||
children: history
|
children: history
|
||||||
.map<Widget>((e) => Padding(
|
.map<Widget>((e) => Padding(
|
||||||
|
@ -141,7 +140,6 @@ class DiscoveryPageState extends State<DiscoveryPage> {
|
||||||
),
|
),
|
||||||
))
|
))
|
||||||
.toList(),
|
.toList(),
|
||||||
),
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
return SizedBox(
|
return SizedBox(
|
||||||
|
@ -289,12 +287,7 @@ class DiscoveryPageState extends State<DiscoveryPage> {
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
_historyList(),
|
_historyList(),
|
||||||
Padding(
|
SizedBox(height: 8),
|
||||||
padding: EdgeInsets.fromLTRB(20, 10, 10, 4),
|
|
||||||
child: Text('Popular',
|
|
||||||
style: context.textTheme.headline6
|
|
||||||
.copyWith(color: context.accentColor)),
|
|
||||||
),
|
|
||||||
SizedBox(
|
SizedBox(
|
||||||
height: 200,
|
height: 200,
|
||||||
child: FutureBuilder<List<OnlinePodcast>>(
|
child: FutureBuilder<List<OnlinePodcast>>(
|
||||||
|
@ -344,7 +337,7 @@ class DiscoveryPageState extends State<DiscoveryPage> {
|
||||||
widget.onTap('');
|
widget.onTap('');
|
||||||
searchState.setGenre = e;
|
searchState.setGenre = e;
|
||||||
},
|
},
|
||||||
title: Text(e.name),
|
title: Text(e.name, style: context.textTheme.headline6),
|
||||||
))
|
))
|
||||||
.toList(),
|
.toList(),
|
||||||
),
|
),
|
||||||
|
|
|
@ -85,9 +85,8 @@ class MyHomePageDelegate extends SearchDelegate<int> {
|
||||||
child: IconButton(
|
child: IconButton(
|
||||||
tooltip: context.s.back,
|
tooltip: context.s.back,
|
||||||
splashRadius: 20,
|
splashRadius: 20,
|
||||||
icon: AnimatedIcon(
|
icon: Icon(
|
||||||
icon: AnimatedIcons.menu_arrow,
|
_getIconData(Theme.of(context).platform)
|
||||||
progress: transitionAnimation,
|
|
||||||
),
|
),
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
close(context, 1);
|
close(context, 1);
|
||||||
|
@ -173,6 +172,21 @@ class MyHomePageDelegate extends SearchDelegate<int> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static IconData _getIconData(TargetPlatform platform) {
|
||||||
|
switch (platform) {
|
||||||
|
case TargetPlatform.android:
|
||||||
|
case TargetPlatform.fuchsia:
|
||||||
|
case TargetPlatform.linux:
|
||||||
|
case TargetPlatform.windows:
|
||||||
|
return Icons.arrow_back;
|
||||||
|
case TargetPlatform.iOS:
|
||||||
|
case TargetPlatform.macOS:
|
||||||
|
return Icons.arrow_back_ios;
|
||||||
|
}
|
||||||
|
assert(false);
|
||||||
|
return null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class RssResult extends StatefulWidget {
|
class RssResult extends StatefulWidget {
|
||||||
|
@ -378,8 +392,8 @@ class __SearchPopupMenuState extends State<_SearchPopupMenu> {
|
||||||
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(10)),
|
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(10)),
|
||||||
elevation: 1,
|
elevation: 1,
|
||||||
icon: SizedBox(
|
icon: SizedBox(
|
||||||
height: 20,
|
height: 25,
|
||||||
width: 20,
|
width: 25,
|
||||||
child: CircleAvatar(
|
child: CircleAvatar(
|
||||||
backgroundImage: _searchEngine == SearchEngine.podcastIndex
|
backgroundImage: _searchEngine == SearchEngine.podcastIndex
|
||||||
? AssetImage('assets/podcastindex_logo.png')
|
? AssetImage('assets/podcastindex_logo.png')
|
||||||
|
|
|
@ -511,6 +511,7 @@ class _SearchPageState<T> extends State<_SearchPage<T>> {
|
||||||
textTheme: theme.primaryTextTheme,
|
textTheme: theme.primaryTextTheme,
|
||||||
brightness: theme.primaryColorBrightness,
|
brightness: theme.primaryColorBrightness,
|
||||||
leading: widget.delegate.buildLeading(context),
|
leading: widget.delegate.buildLeading(context),
|
||||||
|
elevation: 1,
|
||||||
title: TextField(
|
title: TextField(
|
||||||
controller: widget.delegate._queryTextController,
|
controller: widget.delegate._queryTextController,
|
||||||
focusNode: focusNode,
|
focusNode: focusNode,
|
||||||
|
|
Loading…
Reference in New Issue