mirror of
https://github.com/meditohq/medito-app.git
synced 2024-09-11 12:15:46 +03:00
loading state list
and restructured packages
This commit is contained in:
parent
911601b75d
commit
92bb51f5a4
@ -2,10 +2,10 @@
|
||||
# This is a generated file; do not edit or check into version control.
|
||||
export "FLUTTER_ROOT=/Users/mike/flutter"
|
||||
export "FLUTTER_APPLICATION_PATH=/Users/mike/AndroidStudioProjects/medito-app"
|
||||
export "FLUTTER_TARGET=/Users/mike/AndroidStudioProjects/medito-app/lib/main.dart"
|
||||
export "FLUTTER_TARGET=/Users/mike/AndroidStudioProjects/medito-app/lib/widgets/main.dart"
|
||||
export "FLUTTER_BUILD_DIR=build"
|
||||
export "SYMROOT=${SOURCE_ROOT}/../build/ios"
|
||||
export "FLUTTER_FRAMEWORK_DIR=/Users/mike/flutter/bin/cache/artifacts/engine/ios"
|
||||
export "FLUTTER_BUILD_NAME=1.0.6"
|
||||
export "FLUTTER_BUILD_NUMBER=6"
|
||||
export "FLUTTER_BUILD_NAME=1.0.7"
|
||||
export "FLUTTER_BUILD_NUMBER=7"
|
||||
export "TRACK_WIDGET_CREATION=true"
|
||||
|
@ -2,7 +2,7 @@ import 'package:Medito/tracking/tracking.dart';
|
||||
import 'package:audioplayers/audioplayers.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import '../colors.dart';
|
||||
import '../utils/colors.dart';
|
||||
import '../viewmodel/list_item.dart';
|
||||
import 'audio_singleton.dart';
|
||||
|
||||
|
@ -4,6 +4,7 @@ class MeditoColors {
|
||||
static const lightColor = Color(0xffebe7e4);
|
||||
static const lightTextColor = Color(0xffa7aab1);
|
||||
static const lightColorLine = Color(0xff595F65);
|
||||
static const lightColorTrans = Color(0x30595F65);
|
||||
static var darkColor = Color(0xff343b43);
|
||||
static var darkBGColor = Color(0xff22282D);
|
||||
}
|
@ -1,6 +1,6 @@
|
||||
import 'package:Medito/viewmodel/pages_data.dart';
|
||||
|
||||
import '../utils.dart';
|
||||
import '../utils/utils.dart';
|
||||
|
||||
class Pages {
|
||||
int code;
|
||||
|
@ -1,4 +1,4 @@
|
||||
import '../utils.dart';
|
||||
import '../utils/utils.dart';
|
||||
|
||||
class Data {
|
||||
String description;
|
||||
|
@ -3,9 +3,9 @@ import 'package:audioplayers/audioplayers.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_svg/svg.dart';
|
||||
|
||||
import 'audioplayer/audio_singleton.dart';
|
||||
import 'colors.dart';
|
||||
import 'viewmodel/list_item.dart';
|
||||
import '../audioplayer/audio_singleton.dart';
|
||||
import '../utils/colors.dart';
|
||||
import '../viewmodel/list_item.dart';
|
||||
|
||||
class ListItemFileWidget extends StatefulWidget {
|
||||
ListItemFileWidget({Key key, this.item, this.currentlyPlayingState})
|
@ -1,7 +1,7 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'viewmodel/list_item.dart';
|
||||
import '../viewmodel/list_item.dart';
|
||||
|
||||
import 'colors.dart';
|
||||
import '../utils/colors.dart';
|
||||
|
||||
class ListItemFolderWidget extends StatelessWidget {
|
||||
ListItemFolderWidget({Key key, this.listItemModel}) : super(key: key);
|
71
lib/widgets/loading_list_widget.dart
Normal file
71
lib/widgets/loading_list_widget.dart
Normal file
@ -0,0 +1,71 @@
|
||||
import 'package:Medito/utils/colors.dart';
|
||||
import 'package:Medito/viewmodel/list_item.dart';
|
||||
import 'package:Medito/widgets/nav_widget.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class LoadingListWidget extends StatelessWidget {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return ListView.builder(
|
||||
itemCount: 6,
|
||||
itemBuilder: (context, i) {
|
||||
if (i == 0) {
|
||||
var list = [
|
||||
ListItem(" ", " ", null,
|
||||
parentId: "...")
|
||||
];
|
||||
return IgnorePointer(ignoring: true, child: NavWidget(list: list));
|
||||
}
|
||||
return loadingItem(context, i);
|
||||
});
|
||||
}
|
||||
|
||||
Widget loadingItem(BuildContext context, int i) {
|
||||
i = i + 1;
|
||||
return Opacity(
|
||||
opacity: 1 - i / 7,
|
||||
child: Row(mainAxisAlignment: MainAxisAlignment.start, children: [
|
||||
Flexible(
|
||||
child: Container(
|
||||
padding: EdgeInsets.fromLTRB(16, 12, 16, 16),
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: <Widget>[
|
||||
Padding(
|
||||
padding: EdgeInsets.only(right: 12.0, left: 4, top: 4),
|
||||
child: Container( decoration: getBoxDecoration(),
|
||||
height: 18, width: 18,)
|
||||
),
|
||||
Flexible(
|
||||
child: Container(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: <Widget>[
|
||||
Container(
|
||||
decoration: getBoxDecoration(),
|
||||
child: Text(" ",
|
||||
style: Theme.of(context).textTheme.title)),
|
||||
Container(height: 5),
|
||||
Container(
|
||||
decoration: getBoxDecoration(),
|
||||
child: Text(
|
||||
" ",
|
||||
style: Theme.of(context).textTheme.title)),
|
||||
],
|
||||
))),
|
||||
],
|
||||
)),
|
||||
)
|
||||
]),
|
||||
);
|
||||
}
|
||||
|
||||
BoxDecoration getBoxDecoration() {
|
||||
return new BoxDecoration(
|
||||
gradient: new LinearGradient(
|
||||
colors: [MeditoColors.lightColorLine, MeditoColors.lightColorTrans],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
@ -1,17 +1,19 @@
|
||||
import 'package:Medito/widgets/loading_list_widget.dart';
|
||||
import 'package:audioplayers/audioplayers.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:google_fonts/google_fonts.dart';
|
||||
|
||||
import 'audioplayer/audio_singleton.dart';
|
||||
import 'audioplayer/player_widget.dart';
|
||||
import 'colors.dart';
|
||||
import '../audioplayer/audio_singleton.dart';
|
||||
import '../audioplayer/player_widget.dart';
|
||||
import '../utils/colors.dart';
|
||||
import 'list_item_file_widget.dart';
|
||||
import 'list_item_folder_widget.dart';
|
||||
import 'list_item_image_widget.dart';
|
||||
import 'nav_widget.dart';
|
||||
import 'tracking/tracking.dart';
|
||||
import 'viewmodel/list_item.dart';
|
||||
import 'viewmodel/main_view_model.dart';
|
||||
import '../tracking/tracking.dart';
|
||||
import '../viewmodel/list_item.dart';
|
||||
import '../viewmodel/main_view_model.dart';
|
||||
|
||||
Future<void> main() async {
|
||||
runApp(HomeScreenWidget());
|
||||
@ -135,6 +137,10 @@ class _MainWidgetState extends State<MainWidget>
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
SystemChrome.setSystemUIOverlayStyle(SystemUiOverlayStyle(
|
||||
statusBarBrightness: Brightness.dark,
|
||||
));
|
||||
|
||||
MeditoAudioPlayer()
|
||||
.audioPlayer
|
||||
.onPlayerStateChanged
|
||||
@ -244,9 +250,7 @@ class _MainWidgetState extends State<MainWidget>
|
||||
if (snapshot.connectionState == ConnectionState.waiting ||
|
||||
snapshot.hasData == false ||
|
||||
snapshot.hasData == null) {
|
||||
return Center(
|
||||
child: CircularProgressIndicator(),
|
||||
);
|
||||
return LoadingListWidget();
|
||||
}
|
||||
|
||||
if (snapshot.connectionState == ConnectionState.none) {
|
@ -1,8 +1,8 @@
|
||||
import 'package:Medito/colors.dart';
|
||||
import 'package:Medito/utils/colors.dart';
|
||||
import 'package:Medito/tracking/tracking.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import 'viewmodel/list_item.dart';
|
||||
import '../viewmodel/list_item.dart';
|
||||
|
||||
class NavWidget extends StatefulWidget {
|
||||
const NavWidget({Key key, this.list, this.backPressed}) : super(key: key);
|
@ -120,7 +120,7 @@ packages:
|
||||
name: google_fonts
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "0.3.7"
|
||||
version: "0.3.9"
|
||||
http:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
@ -11,7 +11,7 @@ description: A meditation learning tool
|
||||
# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
|
||||
# Read more about iOS versioning at
|
||||
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
|
||||
version: 1.0.6+6
|
||||
version: 1.0.7+7
|
||||
|
||||
environment:
|
||||
sdk: ">=2.2.0 <3.0.0"
|
||||
@ -19,7 +19,7 @@ environment:
|
||||
dependencies:
|
||||
flutter:
|
||||
sdk: flutter
|
||||
google_fonts: ^0.3.7
|
||||
google_fonts: ^0.3.9
|
||||
audioplayers: ^0.14.0
|
||||
flutter_svg: ^0.17.1
|
||||
path_provider: ^1.6.0
|
||||
|
Loading…
Reference in New Issue
Block a user