mirror of
https://github.com/stonega/tsacdop
synced 2025-02-26 16:27:39 +01:00
Add time picker in sleeper mode, custom playlist.
This commit is contained in:
parent
bb4f26cd34
commit
d3d21f28e3
@ -3,10 +3,12 @@ import 'dart:math' as math;
|
|||||||
|
|
||||||
import 'package:audio_service/audio_service.dart';
|
import 'package:audio_service/audio_service.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter_time_picker_spinner/flutter_time_picker_spinner.dart';
|
||||||
import 'package:google_fonts/google_fonts.dart';
|
import 'package:google_fonts/google_fonts.dart';
|
||||||
import 'package:line_icons/line_icons.dart';
|
import 'package:line_icons/line_icons.dart';
|
||||||
import 'package:marquee/marquee.dart';
|
import 'package:marquee/marquee.dart';
|
||||||
import 'package:provider/provider.dart';
|
import 'package:provider/provider.dart';
|
||||||
|
import 'package:tsacdop/playlists/playlist_home.dart';
|
||||||
import 'package:tuple/tuple.dart';
|
import 'package:tuple/tuple.dart';
|
||||||
|
|
||||||
import '../episodes/episode_detail.dart';
|
import '../episodes/episode_detail.dart';
|
||||||
@ -15,6 +17,7 @@ import '../local_storage/sqflite_localpodcast.dart';
|
|||||||
import '../state/audio_state.dart';
|
import '../state/audio_state.dart';
|
||||||
import '../type/episodebrief.dart';
|
import '../type/episodebrief.dart';
|
||||||
import '../type/play_histroy.dart';
|
import '../type/play_histroy.dart';
|
||||||
|
import '../type/playlist.dart';
|
||||||
import '../util/extension_helper.dart';
|
import '../util/extension_helper.dart';
|
||||||
import '../util/pageroute.dart';
|
import '../util/pageroute.dart';
|
||||||
import '../widgets/audiopanel.dart';
|
import '../widgets/audiopanel.dart';
|
||||||
@ -402,202 +405,280 @@ class _PlaylistWidgetState extends State<PlaylistWidget> {
|
|||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
var audio = Provider.of<AudioPlayerNotifier>(context, listen: false);
|
var audio = Provider.of<AudioPlayerNotifier>(context, listen: false);
|
||||||
return Container(
|
return ClipRRect(
|
||||||
alignment: Alignment.topLeft,
|
borderRadius: BorderRadius.circular(10),
|
||||||
height: 300,
|
child: Container(
|
||||||
width: double.infinity,
|
alignment: Alignment.topLeft,
|
||||||
decoration: BoxDecoration(
|
height: 300,
|
||||||
color: context.accentColor.withAlpha(70),
|
width: double.infinity,
|
||||||
borderRadius: BorderRadius.circular(10),
|
decoration: BoxDecoration(
|
||||||
),
|
color: context.accentColor.withAlpha(70),
|
||||||
child: Column(
|
borderRadius: BorderRadius.circular(10),
|
||||||
children: <Widget>[
|
),
|
||||||
Expanded(
|
child: Selector<AudioPlayerNotifier, Tuple2<Playlist, EpisodeBrief>>(
|
||||||
child: Selector<AudioPlayerNotifier, List<EpisodeBrief>>(
|
selector: (_, audio) => Tuple2(audio.playlist, audio.episode),
|
||||||
selector: (_, audio) => audio.playlist.episodes,
|
builder: (_, data, __) {
|
||||||
builder: (_, data, __) {
|
var episodes = data.item1.episodes;
|
||||||
var episodesToPlay = data.sublist(1);
|
return Column(
|
||||||
return AnimatedList(
|
children: <Widget>[
|
||||||
key: miniPlaylistKey,
|
Expanded(
|
||||||
shrinkWrap: true,
|
child: data.item1.name == 'Queue'
|
||||||
scrollDirection: Axis.vertical,
|
? AnimatedList(
|
||||||
initialItemCount: episodesToPlay.length,
|
key: miniPlaylistKey,
|
||||||
itemBuilder: (context, index, animation) => ScaleTransition(
|
shrinkWrap: true,
|
||||||
alignment: Alignment.center,
|
scrollDirection: Axis.vertical,
|
||||||
scale: animation,
|
initialItemCount: episodes.length,
|
||||||
child: Column(
|
itemBuilder: (context, index, animation) =>
|
||||||
children: <Widget>[
|
ScaleTransition(
|
||||||
Row(
|
alignment: Alignment.center,
|
||||||
children: <Widget>[
|
scale: animation,
|
||||||
Expanded(
|
child: Column(
|
||||||
child: Material(
|
children: <Widget>[
|
||||||
color: Colors.transparent,
|
Row(
|
||||||
child: InkWell(
|
children: <Widget>[
|
||||||
onTap: () {
|
Expanded(
|
||||||
audio.episodeLoad(data[index]);
|
child: Material(
|
||||||
miniPlaylistKey.currentState.removeItem(
|
color: Colors.transparent,
|
||||||
index,
|
child: InkWell(
|
||||||
(context, animation) => Center());
|
onTap: () {
|
||||||
},
|
audio.episodeLoad(episodes[index]);
|
||||||
child: Container(
|
miniPlaylistKey.currentState
|
||||||
height: 60,
|
.removeItem(
|
||||||
padding:
|
index,
|
||||||
EdgeInsets.symmetric(horizontal: 20),
|
(context, animation) =>
|
||||||
alignment: Alignment.centerLeft,
|
Center());
|
||||||
child: Row(
|
},
|
||||||
mainAxisAlignment:
|
child: Container(
|
||||||
MainAxisAlignment.center,
|
height: 60,
|
||||||
crossAxisAlignment:
|
padding: EdgeInsets.symmetric(
|
||||||
CrossAxisAlignment.center,
|
horizontal: 20),
|
||||||
mainAxisSize: MainAxisSize.min,
|
|
||||||
children: <Widget>[
|
|
||||||
Container(
|
|
||||||
padding: EdgeInsets.all(10.0),
|
|
||||||
child: ClipRRect(
|
|
||||||
borderRadius: BorderRadius.all(
|
|
||||||
Radius.circular(15.0)),
|
|
||||||
child: Container(
|
|
||||||
height: 30.0,
|
|
||||||
width: 30.0,
|
|
||||||
child: Image.file(File(
|
|
||||||
"${episodesToPlay[index].imagePath}"))),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Expanded(
|
|
||||||
child: Align(
|
|
||||||
alignment: Alignment.centerLeft,
|
alignment: Alignment.centerLeft,
|
||||||
child: Text(
|
child: Row(
|
||||||
episodesToPlay[index].title,
|
mainAxisAlignment:
|
||||||
maxLines: 1,
|
MainAxisAlignment.center,
|
||||||
overflow: TextOverflow.ellipsis,
|
crossAxisAlignment:
|
||||||
|
CrossAxisAlignment.center,
|
||||||
|
mainAxisSize: MainAxisSize.min,
|
||||||
|
children: <Widget>[
|
||||||
|
Container(
|
||||||
|
padding: EdgeInsets.all(10.0),
|
||||||
|
child: ClipRRect(
|
||||||
|
borderRadius:
|
||||||
|
BorderRadius.all(
|
||||||
|
Radius.circular(
|
||||||
|
15.0)),
|
||||||
|
child: Container(
|
||||||
|
height: 30.0,
|
||||||
|
width: 30.0,
|
||||||
|
child: Image.file(File(
|
||||||
|
"${episodes[index].imagePath}"))),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Expanded(
|
||||||
|
child: Align(
|
||||||
|
alignment:
|
||||||
|
Alignment.centerLeft,
|
||||||
|
child: Text(
|
||||||
|
episodes[index].title,
|
||||||
|
maxLines: 1,
|
||||||
|
overflow:
|
||||||
|
TextOverflow.ellipsis,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Padding(
|
|
||||||
padding:
|
|
||||||
const EdgeInsets.symmetric(horizontal: 20.0),
|
|
||||||
child: Material(
|
|
||||||
borderRadius: BorderRadius.circular(100),
|
|
||||||
clipBehavior: Clip.hardEdge,
|
|
||||||
color: context.primaryColor,
|
|
||||||
child: InkWell(
|
|
||||||
borderRadius:
|
|
||||||
BorderRadius.all(Radius.circular(15.0)),
|
|
||||||
onTap: () async {
|
|
||||||
var episdoe =
|
|
||||||
episodesToPlay.removeAt(index);
|
|
||||||
episodesToPlay.insert(0, episdoe);
|
|
||||||
miniPlaylistKey.currentState.removeItem(
|
|
||||||
index,
|
|
||||||
(context, animation) {
|
|
||||||
return Center();
|
|
||||||
},
|
|
||||||
duration: Duration.zero,
|
|
||||||
);
|
|
||||||
miniPlaylistKey.currentState.insertItem(0,
|
|
||||||
duration: Duration(milliseconds: 100));
|
|
||||||
await Future.delayed(
|
|
||||||
Duration(milliseconds: 100));
|
|
||||||
await audio.moveToTop(data[index + 1]);
|
|
||||||
},
|
|
||||||
child: SizedBox(
|
|
||||||
height: 30.0,
|
|
||||||
width: 30.0,
|
|
||||||
child: Transform.rotate(
|
|
||||||
angle: math.pi,
|
|
||||||
child: Icon(
|
|
||||||
LineIcons.download_solid,
|
|
||||||
size: 20.0,
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
Padding(
|
||||||
|
padding: const EdgeInsets.symmetric(
|
||||||
|
horizontal: 20.0),
|
||||||
|
child: Material(
|
||||||
|
borderRadius:
|
||||||
|
BorderRadius.circular(100),
|
||||||
|
clipBehavior: Clip.hardEdge,
|
||||||
|
color: context.primaryColor,
|
||||||
|
child: InkWell(
|
||||||
|
borderRadius: BorderRadius.all(
|
||||||
|
Radius.circular(15.0)),
|
||||||
|
onTap: () async {
|
||||||
|
var episdoe =
|
||||||
|
episodes.removeAt(index);
|
||||||
|
episodes.insert(0, episdoe);
|
||||||
|
miniPlaylistKey.currentState
|
||||||
|
.removeItem(
|
||||||
|
index,
|
||||||
|
(context, animation) {
|
||||||
|
return Center();
|
||||||
|
},
|
||||||
|
duration: Duration.zero,
|
||||||
|
);
|
||||||
|
miniPlaylistKey.currentState
|
||||||
|
.insertItem(
|
||||||
|
0,
|
||||||
|
duration: Duration(
|
||||||
|
milliseconds: 100));
|
||||||
|
await Future.delayed(
|
||||||
|
Duration(milliseconds: 100));
|
||||||
|
await audio.moveToTop(
|
||||||
|
data.item1.episodes[index + 1]);
|
||||||
|
},
|
||||||
|
child: SizedBox(
|
||||||
|
height: 30.0,
|
||||||
|
width: 30.0,
|
||||||
|
child: Transform.rotate(
|
||||||
|
angle: math.pi,
|
||||||
|
child: Icon(
|
||||||
|
LineIcons.download_solid,
|
||||||
|
size: 20.0,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
Divider(height: 1),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
: ListView.builder(
|
||||||
|
itemCount: episodes.length,
|
||||||
|
itemBuilder: (context, index) {
|
||||||
|
final isPlaying = episodes[index] != null &&
|
||||||
|
episodes[index] == data.item2;
|
||||||
|
return InkWell(
|
||||||
|
onTap: () async {
|
||||||
|
if (!isPlaying) {
|
||||||
|
await context
|
||||||
|
.read<AudioPlayerNotifier>()
|
||||||
|
.loadEpisodeFromPlaylist(episodes[index]);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
child: Container(
|
||||||
|
color: isPlaying
|
||||||
|
? context.accentColor
|
||||||
|
: Colors.transparent,
|
||||||
|
child: Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
|
mainAxisSize: MainAxisSize.min,
|
||||||
|
children: <Widget>[
|
||||||
|
Container(
|
||||||
|
padding: EdgeInsets.all(10.0),
|
||||||
|
child: ClipRRect(
|
||||||
|
borderRadius: BorderRadius.all(
|
||||||
|
Radius.circular(15.0)),
|
||||||
|
child: Container(
|
||||||
|
height: 30.0,
|
||||||
|
width: 30.0,
|
||||||
|
child: Image.file(File(
|
||||||
|
"${episodes[index].imagePath}"))),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Expanded(
|
||||||
|
child: Align(
|
||||||
|
alignment: Alignment.centerLeft,
|
||||||
|
child: Text(
|
||||||
|
episodes[index].title,
|
||||||
|
maxLines: 1,
|
||||||
|
overflow: TextOverflow.ellipsis,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
if (isPlaying)
|
||||||
|
Container(
|
||||||
|
height: 20,
|
||||||
|
width: 20,
|
||||||
|
margin: EdgeInsets.symmetric(
|
||||||
|
horizontal: 10),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
shape: BoxShape.circle,
|
||||||
|
),
|
||||||
|
child: WaveLoader(
|
||||||
|
color: context.primaryColor)),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 60.0,
|
||||||
|
child: Padding(
|
||||||
|
padding: const EdgeInsets.symmetric(horizontal: 20),
|
||||||
|
child: Row(
|
||||||
|
children: <Widget>[
|
||||||
|
Text(
|
||||||
|
data.item1.name == 'Queue'
|
||||||
|
? context.s.queue
|
||||||
|
: '${context.s.homeMenuPlaylist}${'-${data.item1.name}'}',
|
||||||
|
overflow: TextOverflow.fade,
|
||||||
|
style: TextStyle(
|
||||||
|
color: context.accentColor,
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
fontSize: 16),
|
||||||
|
),
|
||||||
|
Spacer(),
|
||||||
|
Material(
|
||||||
|
borderRadius: BorderRadius.circular(100),
|
||||||
|
color: context.primaryColor,
|
||||||
|
child: InkWell(
|
||||||
|
borderRadius: BorderRadius.all(Radius.circular(15)),
|
||||||
|
onTap: () {
|
||||||
|
audio.playNext();
|
||||||
|
miniPlaylistKey.currentState.removeItem(
|
||||||
|
0, (context, animation) => Container());
|
||||||
|
miniPlaylistKey.currentState.insertItem(0);
|
||||||
|
},
|
||||||
|
child: SizedBox(
|
||||||
|
height: 30,
|
||||||
|
width: 60,
|
||||||
|
child: Icon(
|
||||||
|
Icons.skip_next,
|
||||||
|
size: 30,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SizedBox(width: 20),
|
||||||
|
Material(
|
||||||
|
borderRadius: BorderRadius.circular(100),
|
||||||
|
color: context.primaryColor,
|
||||||
|
child: InkWell(
|
||||||
|
borderRadius: BorderRadius.circular(15.0),
|
||||||
|
onTap: () {
|
||||||
|
Navigator.push(
|
||||||
|
context,
|
||||||
|
SlideLeftRoute(page: PlaylistHome()),
|
||||||
|
);
|
||||||
|
},
|
||||||
|
child: SizedBox(
|
||||||
|
height: 30.0,
|
||||||
|
width: 30.0,
|
||||||
|
child: Transform.rotate(
|
||||||
|
angle: math.pi,
|
||||||
|
child: Icon(
|
||||||
|
LineIcons.database_solid,
|
||||||
|
size: 20.0,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
),
|
||||||
),
|
),
|
||||||
Divider(height: 1),
|
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
),
|
||||||
},
|
],
|
||||||
),
|
);
|
||||||
),
|
},
|
||||||
SizedBox(
|
),
|
||||||
height: 60.0,
|
|
||||||
child: Padding(
|
|
||||||
padding: const EdgeInsets.symmetric(horizontal: 20),
|
|
||||||
child: Row(
|
|
||||||
children: <Widget>[
|
|
||||||
Text(
|
|
||||||
context.s.homeMenuPlaylist,
|
|
||||||
style: TextStyle(
|
|
||||||
color: context.accentColor,
|
|
||||||
fontWeight: FontWeight.bold,
|
|
||||||
fontSize: 16),
|
|
||||||
),
|
|
||||||
Spacer(),
|
|
||||||
Material(
|
|
||||||
borderRadius: BorderRadius.circular(100),
|
|
||||||
color: context.primaryColor,
|
|
||||||
child: InkWell(
|
|
||||||
borderRadius: BorderRadius.all(Radius.circular(15)),
|
|
||||||
onTap: () {
|
|
||||||
audio.playNext();
|
|
||||||
miniPlaylistKey.currentState
|
|
||||||
.removeItem(0, (context, animation) => Container());
|
|
||||||
miniPlaylistKey.currentState.insertItem(0);
|
|
||||||
},
|
|
||||||
child: SizedBox(
|
|
||||||
height: 30,
|
|
||||||
width: 60,
|
|
||||||
child: Icon(
|
|
||||||
Icons.skip_next,
|
|
||||||
size: 30,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
SizedBox(width: 20),
|
|
||||||
Material(
|
|
||||||
borderRadius: BorderRadius.circular(100),
|
|
||||||
color: context.primaryColor,
|
|
||||||
child: InkWell(
|
|
||||||
borderRadius: BorderRadius.circular(15.0),
|
|
||||||
onTap: () {
|
|
||||||
Navigator.push(
|
|
||||||
context,
|
|
||||||
SlideLeftRoute(
|
|
||||||
page: PlaylistPage(
|
|
||||||
initPage: InitPage.playlist,
|
|
||||||
)),
|
|
||||||
);
|
|
||||||
},
|
|
||||||
child: SizedBox(
|
|
||||||
height: 30.0,
|
|
||||||
width: 30.0,
|
|
||||||
child: Transform.rotate(
|
|
||||||
angle: math.pi,
|
|
||||||
child: Icon(
|
|
||||||
LineIcons.database_solid,
|
|
||||||
size: 20.0,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -613,6 +694,7 @@ class SleepMode extends StatefulWidget {
|
|||||||
class SleepModeState extends State<SleepMode>
|
class SleepModeState extends State<SleepMode>
|
||||||
with SingleTickerProviderStateMixin {
|
with SingleTickerProviderStateMixin {
|
||||||
int _minSelected;
|
int _minSelected;
|
||||||
|
bool _openClock;
|
||||||
AnimationController _controller;
|
AnimationController _controller;
|
||||||
Animation<double> _animation;
|
Animation<double> _animation;
|
||||||
Future _getDefaultTime() async {
|
Future _getDefaultTime() async {
|
||||||
@ -626,7 +708,7 @@ class SleepModeState extends State<SleepMode>
|
|||||||
super.initState();
|
super.initState();
|
||||||
_minSelected = 30;
|
_minSelected = 30;
|
||||||
_getDefaultTime();
|
_getDefaultTime();
|
||||||
|
_openClock = false;
|
||||||
_controller =
|
_controller =
|
||||||
AnimationController(vsync: this, duration: Duration(milliseconds: 400));
|
AnimationController(vsync: this, duration: Duration(milliseconds: 400));
|
||||||
_animation = Tween<double>(begin: 0.0, end: 1.0).animate(_controller)
|
_animation = Tween<double>(begin: 0.0, end: 1.0).animate(_controller)
|
||||||
@ -707,33 +789,43 @@ class SleepModeState extends State<SleepMode>
|
|||||||
padding: EdgeInsets.symmetric(vertical: 20),
|
padding: EdgeInsets.symmetric(vertical: 20),
|
||||||
child: move == 1
|
child: move == 1
|
||||||
? Center()
|
? Center()
|
||||||
: Wrap(
|
: _openClock
|
||||||
direction: Axis.horizontal,
|
? SleepTimerPicker(
|
||||||
children: kMinsToSelect
|
onChange: (duration) {
|
||||||
.map((e) => InkWell(
|
setState(() {
|
||||||
onTap: () =>
|
_minSelected = duration.inMinutes;
|
||||||
setState(() => _minSelected = e),
|
});
|
||||||
child: Container(
|
},
|
||||||
margin: EdgeInsets.all(10.0),
|
)
|
||||||
decoration: BoxDecoration(
|
: Wrap(
|
||||||
color: (e == _minSelected)
|
direction: Axis.horizontal,
|
||||||
? context.accentColor
|
children: kMinsToSelect
|
||||||
: context.primaryColor,
|
.map((e) => InkWell(
|
||||||
shape: BoxShape.circle,
|
onTap: () => setState(
|
||||||
),
|
() => _minSelected = e),
|
||||||
alignment: Alignment.center,
|
child: Container(
|
||||||
height: 30,
|
margin: EdgeInsets.all(10.0),
|
||||||
width: 30,
|
decoration: BoxDecoration(
|
||||||
child: Text(e.toString(),
|
color: (e == _minSelected)
|
||||||
style: TextStyle(
|
? context.accentColor
|
||||||
fontWeight: FontWeight.bold,
|
: context.primaryColor,
|
||||||
color: (e == _minSelected)
|
shape: BoxShape.circle,
|
||||||
? Colors.white
|
),
|
||||||
: null)),
|
alignment: Alignment.center,
|
||||||
),
|
height: 30,
|
||||||
))
|
width: 30,
|
||||||
.toList(),
|
child: Text(e.toString(),
|
||||||
),
|
style: TextStyle(
|
||||||
|
fontWeight:
|
||||||
|
FontWeight.bold,
|
||||||
|
color:
|
||||||
|
(e == _minSelected)
|
||||||
|
? Colors.white
|
||||||
|
: null)),
|
||||||
|
),
|
||||||
|
))
|
||||||
|
.toList(),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Stack(
|
Stack(
|
||||||
@ -849,15 +941,37 @@ class SleepModeState extends State<SleepMode>
|
|||||||
height: 60.0,
|
height: 60.0,
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: EdgeInsets.symmetric(horizontal: 20.0),
|
padding: EdgeInsets.symmetric(horizontal: 20.0),
|
||||||
child: Align(
|
child: Row(
|
||||||
alignment: Alignment.centerLeft,
|
children: [
|
||||||
child: Text(
|
Text(context.s.sleepTimer,
|
||||||
context.s.sleepTimer,
|
style: TextStyle(
|
||||||
style: TextStyle(
|
color: context.accentColor,
|
||||||
color: context.accentColor,
|
fontWeight: FontWeight.bold,
|
||||||
fontWeight: FontWeight.bold,
|
fontSize: 16)),
|
||||||
fontSize: 16),
|
Spacer(),
|
||||||
),
|
Material(
|
||||||
|
borderRadius: BorderRadius.circular(100),
|
||||||
|
color: context.primaryColor,
|
||||||
|
child: InkWell(
|
||||||
|
borderRadius: BorderRadius.circular(15.0),
|
||||||
|
onTap: () {
|
||||||
|
setState(() {
|
||||||
|
_openClock = !_openClock;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
child: SizedBox(
|
||||||
|
height: 30.0,
|
||||||
|
width: 30.0,
|
||||||
|
child: Icon(
|
||||||
|
_openClock
|
||||||
|
? LineIcons.circle_solid
|
||||||
|
: LineIcons.clock,
|
||||||
|
size: 20.0,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user