1
0
mirror of https://github.com/stonega/tsacdop synced 2025-01-24 04:32:28 +01:00
tsacdop-podcast-app-android/lib/home/appbar/importompl.dart
stonegate 7ba0552717 modified: lib/class/settingstate.dart
modified:   lib/episodes/episodedetail.dart
	modified:   lib/home/appbar/about.dart
modified:   lib/home/appbar/addpodcast.dart
	modified:   lib/home/appbar/importompl.dart
	modified:   lib/home/appbar/popupmenu.dart
	modified:   lib/home/audio_player.dart
	modified:   lib/home/audiopanel.dart
	modified:   lib/home/homescroll.dart
	modified:   lib/home/hometab.dart
	modified:   lib/local_storage/key_value_storage.dart
	modified:   lib/main.dart
	modified:   lib/podcasts/podcastdetail.dart
	modified:   lib/podcasts/podcastgroup.dart
	modified:   lib/podcasts/podcastlist.dart
	modified:   lib/podcasts/podcastmanage.dart
	modified:   lib/util/episodegrid.dart
2020-02-22 20:25:06 +08:00

76 lines
3.4 KiB
Dart

import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import 'package:tsacdop/class/importompl.dart';
class Import extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Consumer<ImportOmpl>(
builder: (context, importOmpl, _) => Container(
color: Theme.of(context).primaryColorDark,
child: importOmpl.importState == ImportState.start
? Column(
mainAxisAlignment: MainAxisAlignment.start,
mainAxisSize: MainAxisSize.min,
children: <Widget>[
SizedBox(height: 2.0, child: LinearProgressIndicator()),
Container(
padding: EdgeInsets.symmetric(horizontal: 20.0),
height: 20.0,
alignment: Alignment.centerLeft,
child: Text('Read file successful'),
),
])
: importOmpl.importState == ImportState.import
? Column(
mainAxisAlignment: MainAxisAlignment.start,
mainAxisSize: MainAxisSize.min,
children: <Widget>[
SizedBox(height: 2.0, child: LinearProgressIndicator()),
Container(
height: 20.0,
padding: EdgeInsets.symmetric(horizontal: 20.0),
alignment: Alignment.centerLeft,
child:
Text('Connetting: ' + (importOmpl.rsstitle))),
],
)
: importOmpl.importState == ImportState.parse
? Column(
mainAxisAlignment: MainAxisAlignment.start,
mainAxisSize: MainAxisSize.min,
children: <Widget>[
SizedBox(
height: 2.0, child: LinearProgressIndicator()),
Container(
height: 20.0,
padding: EdgeInsets.symmetric(horizontal: 20.0),
alignment: Alignment.centerLeft,
child:
Text('Fetch data: ' + (importOmpl.rsstitle)),
),
],
)
: importOmpl.importState == ImportState.error
? Column(
mainAxisAlignment: MainAxisAlignment.start,
mainAxisSize: MainAxisSize.min,
children: <Widget>[
SizedBox(
height: 2.0,
child: LinearProgressIndicator()),
Container(
height: 20.0,
padding:
EdgeInsets.symmetric(horizontal: 20.0),
alignment: Alignment.centerLeft,
child:
Text('Error: ' + (importOmpl.rsstitle)),
),
],
)
: Center()),
);
}
}