diff --git a/.dart_tool/package_config.json b/.dart_tool/package_config.json index dce157db..c361db17 100644 --- a/.dart_tool/package_config.json +++ b/.dart_tool/package_config.json @@ -9,7 +9,7 @@ }, { "name": "async", - "rootUri": "file:///D:/Programs/ProgrammingLanguage/dart-sdk/flutter/.pub-cache/hosted/pub.dartlang.org/async-2.6.1", + "rootUri": "file:///D:/Programs/ProgrammingLanguage/dart-sdk/flutter/.pub-cache/hosted/pub.dartlang.org/async-2.8.1", "packageUri": "lib/", "languageVersion": "2.12" }, @@ -39,7 +39,7 @@ }, { "name": "charcode", - "rootUri": "file:///D:/Programs/ProgrammingLanguage/dart-sdk/flutter/.pub-cache/hosted/pub.dartlang.org/charcode-1.2.0", + "rootUri": "file:///D:/Programs/ProgrammingLanguage/dart-sdk/flutter/.pub-cache/hosted/pub.dartlang.org/charcode-1.3.1", "packageUri": "lib/", "languageVersion": "2.12" }, @@ -315,7 +315,7 @@ }, { "name": "meta", - "rootUri": "file:///D:/Programs/ProgrammingLanguage/dart-sdk/flutter/.pub-cache/hosted/pub.dartlang.org/meta-1.3.0", + "rootUri": "file:///D:/Programs/ProgrammingLanguage/dart-sdk/flutter/.pub-cache/hosted/pub.dartlang.org/meta-1.7.0", "packageUri": "lib/", "languageVersion": "2.12" }, @@ -507,7 +507,7 @@ }, { "name": "test_api", - "rootUri": "file:///D:/Programs/ProgrammingLanguage/dart-sdk/flutter/.pub-cache/hosted/pub.dartlang.org/test_api-0.3.0", + "rootUri": "file:///D:/Programs/ProgrammingLanguage/dart-sdk/flutter/.pub-cache/hosted/pub.dartlang.org/test_api-0.4.2", "packageUri": "lib/", "languageVersion": "2.12" }, @@ -572,7 +572,7 @@ "languageVersion": "2.7" } ], - "generated": "2021-07-05T04:16:28.165460Z", + "generated": "2021-09-17T17:36:01.339768Z", "generator": "pub", - "generatorVersion": "2.13.4" + "generatorVersion": "2.14.0" } diff --git a/.dart_tool/package_config_subset b/.dart_tool/package_config_subset index 61a5833d..52a392ea 100644 --- a/.dart_tool/package_config_subset +++ b/.dart_tool/package_config_subset @@ -4,8 +4,8 @@ file:///D:/Programs/ProgrammingLanguage/dart-sdk/flutter/.pub-cache/hosted/pub.d file:///D:/Programs/ProgrammingLanguage/dart-sdk/flutter/.pub-cache/hosted/pub.dartlang.org/agora_rtc_engine-1.0.15/lib/ async 2.12 -file:///D:/Programs/ProgrammingLanguage/dart-sdk/flutter/.pub-cache/hosted/pub.dartlang.org/async-2.6.1/ -file:///D:/Programs/ProgrammingLanguage/dart-sdk/flutter/.pub-cache/hosted/pub.dartlang.org/async-2.6.1/lib/ +file:///D:/Programs/ProgrammingLanguage/dart-sdk/flutter/.pub-cache/hosted/pub.dartlang.org/async-2.8.1/ +file:///D:/Programs/ProgrammingLanguage/dart-sdk/flutter/.pub-cache/hosted/pub.dartlang.org/async-2.8.1/lib/ badges 2.12 file:///D:/Programs/ProgrammingLanguage/dart-sdk/flutter/.pub-cache/hosted/pub.dartlang.org/badges-2.0.1/ @@ -24,8 +24,8 @@ file:///D:/Programs/ProgrammingLanguage/dart-sdk/flutter/.pub-cache/hosted/pub.d file:///D:/Programs/ProgrammingLanguage/dart-sdk/flutter/.pub-cache/hosted/pub.dartlang.org/characters-1.1.0/lib/ charcode 2.12 -file:///D:/Programs/ProgrammingLanguage/dart-sdk/flutter/.pub-cache/hosted/pub.dartlang.org/charcode-1.2.0/ -file:///D:/Programs/ProgrammingLanguage/dart-sdk/flutter/.pub-cache/hosted/pub.dartlang.org/charcode-1.2.0/lib/ +file:///D:/Programs/ProgrammingLanguage/dart-sdk/flutter/.pub-cache/hosted/pub.dartlang.org/charcode-1.3.1/ +file:///D:/Programs/ProgrammingLanguage/dart-sdk/flutter/.pub-cache/hosted/pub.dartlang.org/charcode-1.3.1/lib/ clay_containers 2.12 file:///D:/Programs/ProgrammingLanguage/dart-sdk/flutter/.pub-cache/hosted/pub.dartlang.org/clay_containers-0.3.2/ @@ -192,8 +192,8 @@ file:///D:/Programs/ProgrammingLanguage/dart-sdk/flutter/.pub-cache/hosted/pub.d file:///D:/Programs/ProgrammingLanguage/dart-sdk/flutter/.pub-cache/hosted/pub.dartlang.org/material_buttonx-2.0.2/lib/ meta 2.12 -file:///D:/Programs/ProgrammingLanguage/dart-sdk/flutter/.pub-cache/hosted/pub.dartlang.org/meta-1.3.0/ -file:///D:/Programs/ProgrammingLanguage/dart-sdk/flutter/.pub-cache/hosted/pub.dartlang.org/meta-1.3.0/lib/ +file:///D:/Programs/ProgrammingLanguage/dart-sdk/flutter/.pub-cache/hosted/pub.dartlang.org/meta-1.7.0/ +file:///D:/Programs/ProgrammingLanguage/dart-sdk/flutter/.pub-cache/hosted/pub.dartlang.org/meta-1.7.0/lib/ mime 2.12 file:///D:/Programs/ProgrammingLanguage/dart-sdk/flutter/.pub-cache/hosted/pub.dartlang.org/mime-1.0.0/ @@ -316,8 +316,8 @@ file:///D:/Programs/ProgrammingLanguage/dart-sdk/flutter/.pub-cache/hosted/pub.d file:///D:/Programs/ProgrammingLanguage/dart-sdk/flutter/.pub-cache/hosted/pub.dartlang.org/term_glyph-1.2.0/lib/ test_api 2.12 -file:///D:/Programs/ProgrammingLanguage/dart-sdk/flutter/.pub-cache/hosted/pub.dartlang.org/test_api-0.3.0/ -file:///D:/Programs/ProgrammingLanguage/dart-sdk/flutter/.pub-cache/hosted/pub.dartlang.org/test_api-0.3.0/lib/ +file:///D:/Programs/ProgrammingLanguage/dart-sdk/flutter/.pub-cache/hosted/pub.dartlang.org/test_api-0.4.2/ +file:///D:/Programs/ProgrammingLanguage/dart-sdk/flutter/.pub-cache/hosted/pub.dartlang.org/test_api-0.4.2/lib/ timezone 2.12 file:///D:/Programs/ProgrammingLanguage/dart-sdk/flutter/.pub-cache/hosted/pub.dartlang.org/timezone-0.7.0/ diff --git a/.dart_tool/version b/.dart_tool/version index 6b4d1577..fad066f8 100644 --- a/.dart_tool/version +++ b/.dart_tool/version @@ -1 +1 @@ -2.2.3 \ No newline at end of file +2.5.0 \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml index 88a672d5..b0ec2916 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -1,4 +1,7 @@ + + + \ No newline at end of file diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 914d0acb..ecc8d1d7 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -1,573 +1,51 @@ + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + - - - + + + - - - - - + + + + - + + + + + + + @@ -579,6 +57,9 @@ + + diff --git a/build/app/outputs/flutter-apk/app.apk b/build/app/outputs/flutter-apk/app.apk index 620d4fde..1f2bf941 100644 Binary files a/build/app/outputs/flutter-apk/app.apk and b/build/app/outputs/flutter-apk/app.apk differ diff --git a/build/app/outputs/flutter-apk/app.apk.sha1 b/build/app/outputs/flutter-apk/app.apk.sha1 index 3f43441d..78fa2c06 100644 --- a/build/app/outputs/flutter-apk/app.apk.sha1 +++ b/build/app/outputs/flutter-apk/app.apk.sha1 @@ -1 +1 @@ -4059b50d8c0ab3ca5f10078085727c659bd49ffd \ No newline at end of file +93a52c1097493128d40e32d09dda76c8585a3a4c \ No newline at end of file diff --git a/doc.txt b/doc.txt index e3e9af13..eb7c11bb 100644 --- a/doc.txt +++ b/doc.txt @@ -1,7 +1,8 @@ there are bug like edit user post here onUpdatePost url map -*comment edit not add this feature - - * upload imutli image and video but in post screen + - * update text not working + method select image and video - group freind notify - *disable request notify @@ -10,8 +11,6 @@ edit user post here onUpdatePost url map new feature *blok user in other profile -*block user in search friend page - -comment with image - -post multi image -post vdo diff --git a/lib/call/repository/call_agora_repository.dart b/lib/call/repository/call_agora_repository.dart index 7cac558d..737d5a39 100644 --- a/lib/call/repository/call_agora_repository.dart +++ b/lib/call/repository/call_agora_repository.dart @@ -7,6 +7,7 @@ import 'package:socialapp/call/model/call_model.dart'; import 'package:socialapp/call/repository/call_repository.dart'; import 'package:socialapp/call/screen/call_screen.dart'; import 'package:http/http.dart' as http; +import 'package:socialapp/utils/utils.dart'; class CallAgoraRepository implements CallRepository { //database path @@ -93,8 +94,8 @@ class CallAgoraRepository implements CallRepository { String tokenCall = ""; await http.Client() - .get(Uri.parse( - "http://192.168.1.42:8080/resocial/api/v1/generate/token?channelName=$channelName&uid=0&role=publisher&expireTime=3600")) + .get(Uri.parse(TOKEN_URL + + 'token?channelName=$channelName&uid=0&role=publisher&expireTime=3600')) .then((token) { Map t = jsonDecode(token.body); tokenCall = t['token']; @@ -105,7 +106,7 @@ class CallAgoraRepository implements CallRepository { await mRef.doc("$senderId").get().then((info) { senderName = info["user"].toString(); senderPic = info['imageProfile'].toString().isEmpty - ? 'https://img.favpng.com/20/11/12/computer-icons-user-profile-png-favpng-0UAKKCpRRsMj5NaiELzw1pV7L.jpg' + ? CALL_ICON_USER : '${info['imageProfile']}'; }).catchError((e) { senderName = ""; @@ -116,7 +117,7 @@ class CallAgoraRepository implements CallRepository { await mRef.doc("$receiverId").get().then((info) { receiverName = info["user"].toString(); receiverPic = info['imageProfile'].toString().isEmpty - ? 'https://img.favpng.com/20/11/12/computer-icons-user-profile-png-favpng-0UAKKCpRRsMj5NaiELzw1pV7L.jpg' + ? CALL_ICON_USER : '${info['imageProfile']}'; }).catchError((e) { receiverName = ""; diff --git a/lib/chat/bloc/chatBloc/chat_state.dart b/lib/chat/bloc/chatBloc/chat_state.dart index b6a1f59e..bf34b03e 100644 --- a/lib/chat/bloc/chatBloc/chat_state.dart +++ b/lib/chat/bloc/chatBloc/chat_state.dart @@ -6,14 +6,12 @@ abstract class ChatState extends Equatable {} //show while that downloading chat info class ChatLoadingState extends ChatState { @override - // TODO: implement props List get props => []; } //show while that downloaded success class ChatLoadedState extends ChatState { @override - // TODO: implement props List get props => []; } @@ -24,12 +22,10 @@ class LoadedChatInfoSuccess extends ChatState { LoadedChatInfoSuccess({this.chatListInfo}); @override - // TODO: implement props List get props => [this.chatListInfo]; } class LoadedChatEmpty extends ChatState { @override - // TODO: implement props List get props => throw UnimplementedError(); } diff --git a/lib/editPost/screen/edit_user_post.dart b/lib/editPost/screen/edit_user_post.dart index d4ee3e69..3935fa43 100644 --- a/lib/editPost/screen/edit_user_post.dart +++ b/lib/editPost/screen/edit_user_post.dart @@ -42,7 +42,8 @@ class _EditPost extends StatefulWidget { class __EditPostState extends State<_EditPost> { //image url from old post - List urls; + List urls = []; + List urlTypes = []; EditProfileBloc editProfileBloc; PostBloc postBloc; @@ -52,7 +53,9 @@ class __EditPostState extends State<_EditPost> { editProfileBloc = BlocProvider.of(context); postBloc = BlocProvider.of(context); //set message body to edit text - urls = widget.postModel.urls; + urls = widget.postModel.urls == null ? [] : widget.postModel.urls; + urlTypes = + widget.postModel.urlsType == null ? [] : widget.postModel.urlsType; super.initState(); } @@ -126,18 +129,24 @@ class __EditPostState extends State<_EditPost> { if (file != null) { // _image = File(arg.path); - postBloc.add(OnImageFilePostChange(file: File(file.path))); - urls = null; + postBloc.add(OnImageFilePostChange( + file: File(file.path), + urls: urls, + urlTypes: urlTypes, + type: "image")); } } Future _pickCamera(PostBloc postBloc) async { - final file = await ImagePicker().getImage(source: ImageSource.camera); + final file = await ImagePicker().getVideo(source: ImageSource.gallery); if (file != null) { // _image = File(arg.path); - postBloc.add(OnImageFilePostChange(file: File(file.path))); - urls = null; + postBloc.add(OnImageFilePostChange( + file: File(file.path), + urls: urls, + urlTypes: urlTypes, + type: "video")); } } @@ -233,14 +242,27 @@ class __EditPostState extends State<_EditPost> { cubit: postBloc, builder: (context, state) { if (state is OnImageFilePostChangeState) { - return widgetShowImage( - files: state.pathFiles, - urls: null, + //update url and type + return WidgetShowImage( + urls: state.urls, + urlsType: state.urlTypes, + editPost: true, + postBloc: postBloc, ); } - return widgetShowImage( - files: null, - urls: widget.postModel.urls, + if (state is OnImageFileRemoveChangeState) { + return WidgetShowImage( + editPost: true, + postBloc: postBloc, + urls: state.urls, + urlsType: state.urlTypes, + ); + } + return WidgetShowImage( + urls: urls, + urlsType: urlTypes, + editPost: true, + postBloc: postBloc, ); }, ), @@ -299,9 +321,9 @@ class __EditPostState extends State<_EditPost> { @override void dispose() { // _enableRatation(); + super.dispose(); _enableRatation(); editProfileBloc.add(onDisponscEditProfile()); - super.dispose(); } _portraitModeOnly() { diff --git a/lib/generated_plugin_registrant.dart b/lib/generated_plugin_registrant.dart index 4194d701..b39f9748 100644 --- a/lib/generated_plugin_registrant.dart +++ b/lib/generated_plugin_registrant.dart @@ -2,6 +2,7 @@ // Generated file. Do not edit. // +// ignore_for_file: directives_ordering // ignore_for_file: lines_longer_than_80_chars import 'package:cloud_firestore_web/cloud_firestore_web.dart'; diff --git a/lib/home/bloc/bloc_my_feed.dart b/lib/home/bloc/bloc_my_feed.dart index 0f67a3e5..9f3abc48 100644 --- a/lib/home/bloc/bloc_my_feed.dart +++ b/lib/home/bloc/bloc_my_feed.dart @@ -120,7 +120,7 @@ class MyFeedBloc extends Bloc { Future close() async { // TODO: implement close _streamSubscription?.cancel(); - await repository.close(); + repository.close(); return super.close(); } } diff --git a/lib/home/models/post_model.dart b/lib/home/models/post_model.dart index dcbacacd..696f4fc8 100644 --- a/lib/home/models/post_model.dart +++ b/lib/home/models/post_model.dart @@ -48,12 +48,12 @@ class PostModel { commentCount = json.get("commentCount"), date = json.get("date"), time = json.get("time"), - urls = json.get("urls"), - urlsType = json.get("urlsType"), + type = json.get("type"), + urls = (json.get("type") == "image") ? json.get("urls") : null, + urlsType = (json.get("type") == "image") ? json.get("urlsType") : null, likeResults = json.get("likeResult"), likesCount = json.get("likesCount"), postId = json.get("postId"), - type = json.get("type"), uid = json.get("uid"); Future getUID() async { diff --git a/lib/home/screen/look_image.dart b/lib/home/screen/look_image.dart index 48c0caab..8d9a64da 100644 --- a/lib/home/screen/look_image.dart +++ b/lib/home/screen/look_image.dart @@ -166,10 +166,12 @@ class LookImage extends StatelessWidget { ) ], ), - body: _widgetShowImage( - i: i, - urls: urls, - urlsType: urlsType, + body: Center( + child: _widgetShowImage( + i: i, + urls: urls, + urlsType: urlsType, + ), ) // Draggable( // data: 'drag image', @@ -284,33 +286,33 @@ class _widgetShowImage extends StatelessWidget { @override Widget build(BuildContext context) { // final TransformationController controller = TransformationController(); - return Center( - child: ClipRect( - child: InteractiveViewer( - maxScale: 20.0, - child: Container( - // height: MediaQuery.of(context).size.height * .4, - width: MediaQuery.of(context).size.width * 1, - child: ListView.builder( - scrollDirection: Axis.horizontal, - itemCount: urls.length, - itemBuilder: (context, index) { - return urlsType[index] == "video" - ? PlayVideoList( - fulScreen: true, - urls: urls[index], - ) - : FadeInImage.memoryNetwork( - placeholder: kTransparentImage, - image: urls[index], - fit: BoxFit.cover, - // height: MediaQuery.of(context).size.height * .4, - width: MediaQuery.of(context).size.width * 1, - ); - }, - ), - )), - ), + return AspectRatio( + aspectRatio: 2 / 2, + child: ClipRect( + child: InteractiveViewer( + maxScale: 20.0, + child: Container( + // height: MediaQuery.of(context).size.height * .4, + width: MediaQuery.of(context).size.width * 1, + child: ListView.builder( + scrollDirection: Axis.horizontal, + itemCount: urls.length, + itemBuilder: (context, index) { + return urlsType[index] == "video" + ? PlayVideoList( + fulScreen: true, + urls: urls[index], + ) + : FadeInImage.memoryNetwork( + placeholder: kTransparentImage, + image: urls[index], + fit: BoxFit.cover, + width: MediaQuery.of(context).size.width * 1, + ); + }, + ), + )), + ), ); } } diff --git a/lib/home/widget/post_widget.dart b/lib/home/widget/post_widget.dart index 637444ed..8544299b 100644 --- a/lib/home/widget/post_widget.dart +++ b/lib/home/widget/post_widget.dart @@ -499,37 +499,39 @@ class CardPost extends StatelessWidget { } // // - Card _build_card_image_ui(BuildContext context) { - return Card( - shape: RoundedRectangleBorder( - borderRadius: BorderRadius.circular(12.0), - ), - clipBehavior: Clip.antiAliasWithSaveLayer, - child: InkWell( - onTap: () { - //user click look image - print('Look image'); - - Navigator.of(context).push(MaterialPageRoute( - builder: (context) => LookImage( - urls: modelsPost[i].urls, - i: i, - urlsType: modelsPost[i].urlsType, - ), - )); - }, - child: modelsPost[i].urlsType[i] == "video" - ? PlayVideoList( - urls: modelsPost[i].urls[i], - ) - : FadeInImage.memoryNetwork( - placeholder: kTransparentImage, - image: '${modelsPost[i].urls[0]}', - fit: BoxFit.contain, - height: 250.0, - width: double.maxFinite, - )), - ); + AspectRatio _build_card_image_ui(BuildContext context) { + return AspectRatio( + aspectRatio: 3 / 2, + child: Card( + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(12.0), + ), + clipBehavior: Clip.antiAliasWithSaveLayer, + child: InkWell( + onDoubleTap: () { + //user click look image + print('Look image'); + + Navigator.of(context).push(MaterialPageRoute( + builder: (context) => LookImage( + urls: modelsPost[i].urls, + i: i, + urlsType: modelsPost[i].urlsType, + ), + )); + }, + child: modelsPost[i].urlsType[0] == "video_url" + ? PlayVideoList( + urls: modelsPost[i].urls[0], + ) + : FadeInImage.memoryNetwork( + placeholder: kTransparentImage, + image: '${modelsPost[i].urls[0]}', + fit: BoxFit.contain, + height: 250.0, + width: double.maxFinite, + )), + )); } // @@ -667,8 +669,8 @@ class CardPost extends StatelessWidget { class PlayVideoList extends StatefulWidget { PlayVideoList( {Key key, - this.urls, - this.file, + this.urls = null, + this.file = null, this.height = 300.0, this.fulScreen = false}) : super(key: key); diff --git a/lib/main.dart b/lib/main.dart index 013381b5..58926e97 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -26,7 +26,7 @@ Future myBackgroundMessageHandler(RemoteMessage message) async { if (message.notification.title == "chat") { // showNotify.showNotifyMessage(message.notification); } else { - //post notidy + //post notify // showNotify.showNotifyPost(message.notification); } }); @@ -49,7 +49,7 @@ void main() async { // Disable persistence on web platforms await FirebaseAuth.instance.setPersistence(Persistence.LOCAL); } - if (USE_FIRESTORE_EMULATOR) { + if (userFirestoreEmulator) { FirebaseFirestore.instance.settings = Settings(persistenceEnabled: false); } @@ -57,7 +57,7 @@ void main() async { runApp(MyApp()); } -bool USE_FIRESTORE_EMULATOR = false; +bool userFirestoreEmulator = false; class MyApp extends StatefulWidget { MyApp({Key key}) : super(key: key); diff --git a/lib/notifications/screen/notify_screen.dart b/lib/notifications/screen/notify_screen.dart index 7db8d611..bb955c05 100644 --- a/lib/notifications/screen/notify_screen.dart +++ b/lib/notifications/screen/notify_screen.dart @@ -39,15 +39,12 @@ class _notifyScreen extends State { @override void didChangeDependencies() { - // TODO: implement didChangeDependencies - notifyBloc.add(LoadNotifications()); super.didChangeDependencies(); } @override void dispose() { - // TODO: implement dispose notifyBloc.add(Disponse()); _enableRotation(); super.dispose(); diff --git a/lib/showFriend/widget/widget_show_all_freind.dart b/lib/showFriend/widget/widget_show_all_freind.dart index 5ab599f1..c42945f5 100644 --- a/lib/showFriend/widget/widget_show_all_freind.dart +++ b/lib/showFriend/widget/widget_show_all_freind.dart @@ -3,6 +3,8 @@ import 'package:material_buttonx/materialButtonX.dart'; import 'package:socialapp/findFriends/eport/export_friend.dart'; import 'dart:async'; +import 'package:socialapp/utils/utils.dart'; + class widgetShowAllfreind extends StatelessWidget { const widgetShowAllfreind({ Key key, @@ -50,7 +52,9 @@ class widgetShowAllfreind extends StatelessWidget { children: [ ClipOval( child: Image.network( - "${list[i].imageProfile}", + list[i].imageProfile + "" == "" + ? "$PersonURL" + : "${list[i].imageProfile}", fit: BoxFit.cover, width: 90.0, height: 90.0, diff --git a/lib/showFriend/widget/widget_show_request.dart b/lib/showFriend/widget/widget_show_request.dart index 017ea52d..e8d5a3fb 100644 --- a/lib/showFriend/widget/widget_show_request.dart +++ b/lib/showFriend/widget/widget_show_request.dart @@ -4,6 +4,8 @@ import 'package:socialapp/findFriends/eport/export_friend.dart'; import 'package:socialapp/findFriends/models/findFriendResult_model.dart'; import 'dart:async'; +import 'package:socialapp/utils/utils.dart'; + class widgetShowRequest extends StatelessWidget { const widgetShowRequest({ Key key, @@ -43,7 +45,9 @@ class widgetShowRequest extends StatelessWidget { children: [ ClipOval( child: Image.network( - "${list[i].imageProfile}", + list[i].imageProfile + "" == "$PersonURL" + ? "" + : "{list[i].imageProfile}", fit: BoxFit.cover, width: 90.0, height: 90.0, diff --git a/lib/userPost/bloc/event_post.dart b/lib/userPost/bloc/event_post.dart index 6b683e83..ea3186b5 100644 --- a/lib/userPost/bloc/event_post.dart +++ b/lib/userPost/bloc/event_post.dart @@ -1,5 +1,6 @@ import 'dart:io'; +import 'package:flutter/cupertino.dart'; import 'package:socialapp/userPost/models/file_model..dart'; abstract class EventPost {} @@ -46,6 +47,20 @@ class OnMessagePostChange extends EventPost { class OnImageFilePostChange extends EventPost { final File file; + List urlTypes = []; + List urls = []; + final String type; + + OnImageFilePostChange( + {this.file, this.urlTypes, this.urls, @required this.type}); +} + +class OnImageFileRemoveChange extends EventPost { + final int indexRemove; + List urlTypes = []; + List urls = []; + final String type; - OnImageFilePostChange({this.file}); + OnImageFileRemoveChange( + {this.indexRemove, this.urlTypes, this.urls, @required this.type}); } diff --git a/lib/userPost/bloc/post_bloc.dart b/lib/userPost/bloc/post_bloc.dart index 38f9fd4e..b84ad6a8 100644 --- a/lib/userPost/bloc/post_bloc.dart +++ b/lib/userPost/bloc/post_bloc.dart @@ -1,3 +1,4 @@ +import 'dart:collection'; import 'dart:io'; import 'package:flutter_bloc/flutter_bloc.dart'; @@ -33,9 +34,59 @@ class PostBloc extends Bloc { await _pref.remove("messagePost"); await _pref.setString("messagePost", event.message); } + if (event is OnImageFileRemoveChange) { + final _pref = await SharedPreferences.getInstance(); + print("start remove file"); + //list path file + List filePosts; + List removeFiles; + //get path files from shared + filePosts = _pref.getStringList("filesPost") == null + ? [] + : _pref.getStringList("filesPost"); + + removeFiles = _pref.getStringList("removeFile") == null + ? [] + : _pref.getStringList("removeFile"); + + //add remove file for url type + if (event.urlTypes[event.indexRemove] == "image_url" || + event.urlTypes[event.indexRemove] == "video_url") { + removeFiles.add(event.urls[event.indexRemove]); + } + + //remove path from list + if (filePosts.length > 0) { + filePosts.removeAt(event.indexRemove); + } else { + // + filePosts = event.urls != null + ? event.urls.map((e) => e as String).toList() + : []; + filePosts.removeAt(event.indexRemove); + } + + //update file in url and urltype + event.urls.removeAt(event.indexRemove); + event.urlTypes.removeAt(event.indexRemove); + + // + List removeType = event.urlTypes.map((e) => e as String).toList(); + + //save + //await _pref.remove("filesPost"); + await _pref.setStringList("filesPost", filePosts); + await _pref.setStringList("fileTypes", removeType); + await _pref.setStringList("removeFile", removeFiles); + + yield OnImageFileRemoveChangeState( + urlTypes: event.urlTypes, urls: event.urls); + } if (event is OnImageFilePostChange) { final _pref = await SharedPreferences.getInstance(); +//add type image + //list path file List pathFiles; //get path files from shared @@ -43,14 +94,27 @@ class PostBloc extends Bloc { ? [] : _pref.getStringList("filesPost"); + if (pathFiles.length == 0) { + pathFiles = event.urls != null + ? event.urls.map((e) => e as String).toList() + : []; + } + //add apth to list pathFiles.add(event.file.path); + //update urls and urlTypes + event.urls.add(event.file.path); + event.urlTypes.add(event.type); + + List fileTypes = event.urlTypes.map((e) => e as String).toList(); //save //await _pref.remove("filesPost"); await _pref.setStringList("filesPost", pathFiles); + await _pref.setStringList("fileTypes", fileTypes); - yield OnImageFilePostChangeState(pathFiles: pathFiles); + yield OnImageFilePostChangeState( + pathFiles: pathFiles, urlTypes: event.urlTypes, urls: event.urls); } } @@ -60,26 +124,50 @@ class PostBloc extends Bloc { yield OnPostProgress(); final _pref = await SharedPreferences.getInstance(); - final imageFile = (_pref.getString("imagePost") != null) - ? File(_pref.getString("imagePost")) + final imageFile = (_pref.getStringList("filesPost") != null) + ? _pref.getStringList("filesPost") : null; + + //file types + final fileTypes = (_pref.getStringList("fileTypes") != null) + ? _pref.getStringList("fileTypes") + : null; + + final removeFiles = (_pref.getStringList("removeFile") != null) + ? _pref.getStringList("removeFile") + : null; + + // List fileModels = []; + // if (imageFile != null) { + // for (int i = 0; i < imageFile.length; i++) { + // fileModels + // } + // } + + //message post final message = _pref.getString("messagePost"); var result = ""; result = await repository.onUpdatePost( - event.uid, - message, - imageFile, - event.url, - event.postId, - event.likeCount, - event.commentCount, - event.type); + uid: event.uid, + filePosts: imageFile, + message: event.message, + urlTypes: fileTypes, + removeFiles: removeFiles, + postId: event.postId, + like: event.likeCount, + comment: event.commentCount, + type: event.type); + + // result = await repository.onUpdatePost(event.uid, message, null, event.url, + // event.postId, event.likeCount, event.commentCount, event.type); if (result == "successful") { //clear image and message in shared pref await _pref.remove("messagePost"); - await _pref.remove("imagePost"); + await _pref.remove("filesPost"); + await _pref.remove("fileTypes"); + await _pref.remove("removeFile"); yield OnPostSuccessful(); } else { yield OnPostFailed(); @@ -98,21 +186,42 @@ class PostBloc extends Bloc { // ? File(_pref.getString("imagePost")) // : null; - final files = (_pref.getStringList("filesPost") != null) - ? _pref.getStringList("filesPost") - : null; + // final files = (_pref.getStringList("filesPost") != null) + // ? _pref.getStringList("filesPost") + // : null; + + //file types + // final fileTypes = (_pref.getStringList("fileTypes") != null) + // ? _pref.getStringList("fileTypes") + // : null; + + //message final message = _pref.getString("messagePost") ?? null; - //loop get files path - final fileModels = - files.map((path) => FileModel(file: File(path))).toList(); + List fileModels = (_pref.getStringList("filesPost") != null) + ? _pref + .getStringList("filesPost") + .map((e) => FileModel(file: File(e))) + .toList() + : null; + //loop get files path + // UnmodifiableListView fileModels; + // for (int i = 0; i < files.length; i++) { + // fileModels.add(new FileModel( + // file: File(files[i]), + // type: fileTypes[i] == "file" + // ? FileType.FILE_IMAGE + // : FileType.FILE_VIDEO)); + // } var result = ""; result = await repository.onCreatePost(event.uid, message, fileModels); //clear image and message in shared pref await _pref.remove("messagePost"); await _pref.remove("filesPost"); + await _pref.remove("fileTypes"); + await _pref.remove("removeFile"); // if (result == "successful") { diff --git a/lib/userPost/bloc/state_post.dart b/lib/userPost/bloc/state_post.dart index 6cb670dc..93d3c1d9 100644 --- a/lib/userPost/bloc/state_post.dart +++ b/lib/userPost/bloc/state_post.dart @@ -12,11 +12,19 @@ class OnPostFailed extends StatePost {} class OnImageFilePostChangeState extends StatePost { final List pathFiles; + List urls; + List urlTypes; - OnImageFilePostChangeState({this.pathFiles}); + OnImageFilePostChangeState({this.pathFiles, this.urls, this.urlTypes}); @override String toString() { - // TODO: implement toString return "image path :${this.pathFiles}"; } } + +class OnImageFileRemoveChangeState extends StatePost { + final List urls; + final List urlTypes; + + OnImageFileRemoveChangeState({this.urls, this.urlTypes}); +} diff --git a/lib/userPost/models/file_model..dart b/lib/userPost/models/file_model..dart index b8f94359..fd4c5a84 100644 --- a/lib/userPost/models/file_model..dart +++ b/lib/userPost/models/file_model..dart @@ -27,7 +27,7 @@ class FileModel { File getFile() => File(this.file.path); } -enum FileType { FILE_IMAGE, FILE_VIDEO } +enum FileType { FILE_IMAGE, FILE_VIDEO, FILE_IMAGE_URL, FILE_VIDEO_URL } extension FileTypeExtension on FileType { String get getType { @@ -36,6 +36,10 @@ extension FileTypeExtension on FileType { return "image"; case FileType.FILE_VIDEO: return "video"; + case FileType.FILE_VIDEO_URL: + return "video_url"; + case FileType.FILE_IMAGE_URL: + return "image_url"; default: return ""; } diff --git a/lib/userPost/repository/post_repository.dart b/lib/userPost/repository/post_repository.dart index 580ce33f..5043be39 100644 --- a/lib/userPost/repository/post_repository.dart +++ b/lib/userPost/repository/post_repository.dart @@ -16,14 +16,15 @@ class PostRepository { //step 2 check post not have image //step 3 re post with content Future onUpdatePost( - String uid, + {String uid, String message, - File image, - String url, + List filePosts, + List urlTypes, + List removeFiles, String postId, String like, String comment, - String type) async { + String type}) async { bool va = false; String result = ""; final _mRef = FirebaseFirestore.instance; @@ -39,45 +40,68 @@ class PostRepository { // String mTime = time.format(dateTime); //check type update image or message - if (type == 'image') { + if (filePosts != null) { //image //check user update image - if (image != null && url.isEmpty) { + if (filePosts != null && urlTypes != null) { // user update image - print('update post image'); + print('update post image'); final _mRefFile = FirebaseStorage.instance.ref().child("Post File").child("Files"); - //save image to data storage - final uploadTask = _mRefFile.child(postId).putFile(image); + //defind + List urls = []; + List types = []; + + //remove file + for (int i = 0; i < removeFiles.length; i++) { + // _mRefFile.child(removeFiles[i]).delete(); + // print("remove file from path :${removeFiles[i]}"); + await FirebaseStorage.instance + .refFromURL(removeFiles[i]) + .delete() + .then((value) => print("remove file success")) + .catchError((e) => print("remove file error $e")); + } - String urlImage = await uploadTask.snapshot.ref.getDownloadURL(); + //remove url path and type file + await _mRef + .collection("Post") + .doc(postId) + .update({"urls": [], "urlsType": []}); + + //upload new file to storage + for (int i = 0; i < filePosts.length; i++) { + if (urlTypes[i] != "image_url" && urlTypes[i] != "video_url") { + //upload new + final uploadTask = _mRefFile + .child(postId) + .child("${new Random.secure().nextDouble()}" + postId) + .putFile(File(filePosts[i])); + final task = await uploadTask; + + //add url and type + urls.add(await task.ref.getDownloadURL()); + types.add(urlTypes[i] != "image" ? "video_url" : "image_url"); + } else { + //new old file and type + urls.add(filePosts[i]); + types.add(urlTypes[i] != "image_url" ? "video_url" : "image_url"); + } + } - //make map to json - mapBody["uid"] = uid; - mapBody["postId"] = postId; - mapBody["body"] = message; - mapBody["image"] = "${urlImage}"; - mapBody['date'] = date; - mapBody['time'] = time; - mapBody['type'] = 'image'; - mapBody['likesCount'] = "${like}"; - mapBody['commentCount'] = "${comment}"; + ///old version + // final uploadTask = _mRefFile.child(postId).putFile(image); - await _mRef.collection("Post").doc(postId).update(mapBody).then((_) { - print("Update post successful.."); + // String urlImage = await uploadTask.snapshot.ref.getDownloadURL(); - va = true; - }); - } else { - // user not update image - print('not update post image'); //make map to json mapBody["uid"] = uid; mapBody["postId"] = postId; mapBody["body"] = message; - mapBody["image"] = "${url}"; + mapBody["urls"] = urls; + mapBody["urlsType"] = types; mapBody['date'] = date; mapBody['time'] = time; mapBody['type'] = 'image'; @@ -86,7 +110,6 @@ class PostRepository { await _mRef.collection("Post").doc(postId).update(mapBody).then((_) { print("Update post successful.."); - va = true; }); } @@ -97,7 +120,8 @@ class PostRepository { mapBody["uid"] = uid; mapBody["postId"] = postId; mapBody["body"] = message; - mapBody["image"] = ""; + mapBody["urls"] = []; + mapBody["urlsType"] = []; mapBody['date'] = date; mapBody['time'] = time; mapBody['type'] = 'message'; @@ -211,11 +235,11 @@ class PostRepository { if (!files[i].getTypeFile()) { //keep url image file in list - urlsType.add("image"); + urlsType.add("image_url"); // String url = await task.ref.getDownloadURL(); } else { //keep url image file in list - urlsType.add("video"); + urlsType.add("video_url"); // String url = await task.ref.getDownloadURL(); } } @@ -245,8 +269,8 @@ class PostRepository { mapBody["uid"] = uid; mapBody["postId"] = key; mapBody["body"] = message; - mapBody["image"] = []; - mapBody["video"] = []; + mapBody["urls"] = []; + mapBody["urlsType"] = []; mapBody['date'] = date; mapBody['time'] = time; mapBody['type'] = 'message'; diff --git a/lib/userPost/screen/create_new_post.dart b/lib/userPost/screen/create_new_post.dart index 74da11b9..7997e0e9 100644 --- a/lib/userPost/screen/create_new_post.dart +++ b/lib/userPost/screen/create_new_post.dart @@ -43,6 +43,8 @@ class _CreatePost extends StatefulWidget { class __CreatePostState extends State<_CreatePost> { EditProfileBloc editProfileBloc; PostBloc postBloc; + List urls = []; + List urlTypes = []; //uid of current user that login var uid = ''; @@ -112,7 +114,8 @@ class __CreatePostState extends State<_CreatePost> { var arg = await ImagePicker().getImage(source: ImageSource.gallery); if (arg != null) { // _image = File(arg.path); - postBloc.add(OnImageFilePostChange(file: File(arg.path))); + postBloc.add(OnImageFilePostChange( + file: File(arg.path), urlTypes: urlTypes, urls: urls, type: "image")); } } @@ -122,14 +125,13 @@ class __CreatePostState extends State<_CreatePost> { if (arg != null) { // _image = File(arg.path); print("path video file :${arg.path}"); - postBloc.add(OnImageFilePostChange(file: File(arg.path))); + postBloc.add(OnImageFilePostChange( + file: File(arg.path), urlTypes: urlTypes, urls: urls, type: "video")); } } @override void initState() { - // TODO: implement initState - editProfileBloc = BlocProvider.of(context); postBloc = BlocProvider.of(context); @@ -145,7 +147,6 @@ class __CreatePostState extends State<_CreatePost> { //get uid _getUid(); - // TODO: implement didChangeDependencies super.didChangeDependencies(); } @@ -251,14 +252,28 @@ class __CreatePostState extends State<_CreatePost> { cubit: postBloc, builder: (context, state) { if (state is OnImageFilePostChangeState) { - return widgetShowImage( - files: state.pathFiles, - urls: null, + urls = state.urls; + urlTypes = state.urlTypes; + return WidgetShowImage( + editPost: true, + postBloc: postBloc, + urls: state.urls, + urlsType: state.urlTypes, + ); + } + if (state is OnImageFileRemoveChangeState) { + urls = state.urls; + urlTypes = state.urlTypes; + return WidgetShowImage( + editPost: true, + postBloc: postBloc, + urls: state.urls, + urlsType: state.urlTypes, ); } - return widgetShowImage( - files: null, + return WidgetShowImage( urls: null, + urlsType: null, ); }, ), diff --git a/lib/userPost/widget/widget_show_image.dart b/lib/userPost/widget/widget_show_image.dart index b10dd5a7..3ae5d6b8 100644 --- a/lib/userPost/widget/widget_show_image.dart +++ b/lib/userPost/widget/widget_show_image.dart @@ -1,64 +1,255 @@ import 'dart:io'; import 'package:flutter/material.dart'; +import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:socialapp/home/widget/post_widget.dart'; -import 'package:socialapp/userPost/models/file_model..dart'; +import 'package:socialapp/userPost/bloc/event_post.dart'; +import 'package:socialapp/userPost/bloc/post_bloc.dart'; +import 'package:socialapp/userPost/bloc/state_post.dart'; -class widgetShowImage extends StatelessWidget { +class WidgetShowImage extends StatelessWidget { final List files; final List urls; final List urlsType; - const widgetShowImage( - {Key key, this.files = null, this.urls = null, this.urlsType}) + final bool editPost; + final PostBloc postBloc; + const WidgetShowImage( + {Key key, + this.files, + this.urls, + this.urlsType, + this.editPost = false, + this.postBloc}) : super(key: key); @override Widget build(BuildContext context) { - List filesModel = files == null - ? null - : files.map((e) => FileModel(file: File(e))).toList(); - return Container( - child: filesModel != null - ? Container( + // List filesModel = files == null + // ? null + // : files.map((e) => FileModel(file: File(e))).toList(); + return postBloc != null && urls != null + ? _buildRemoveImage() + : urls != null + ? WidgetItemImage( + onTab: (index, type) {}, + urls: urls, + urlsType: urlsType, + ) + : Container( height: 300.0, - width: double.infinity, - child: ListView.builder( - scrollDirection: Axis.horizontal, - itemCount: filesModel.length, - itemBuilder: (context, index) { - return filesModel[index].getTypeFile() - ? PlayVideoList( - file: filesModel[index].file, - height: 300.0, - ) - : Image.file( - filesModel[index].file, - fit: BoxFit.cover, - height: 300.0, - ); - }, + ); + // return Container( + // child: filesModel != null + // ? Container( + // height: 300.0, + // width: double.infinity, + // child: ListView.builder( + // scrollDirection: Axis.horizontal, + // itemCount: filesModel.length, + // itemBuilder: (context, index) { + // return filesModel[index].getTypeFile() + // ? PlayVideoList( + // file: filesModel[index].file, + // height: 300.0, + // ) + // : Image.file( + // filesModel[index].file, + // fit: BoxFit.cover, + // height: 300.0, + // ); + // }, + // ), + // ) + // : (urls == null) + // ? Container( + // height: 300.0, + // ) + // : Container( + // height: 300.0, + // width: double.infinity, + // child: ListView.builder( + // scrollDirection: Axis.horizontal, + // itemCount: urls.length, + // itemBuilder: (context, index) { + // return urlsType[index] == "video" + // ? PlayVideoList( + // urls: urls[index], + // height: 300.0, + // ) + // : Image.network( + // urls[index], + // fit: BoxFit.cover, + // height: 300.0, + // ); + // }, + // ), + // )); + } + + Container _buildRemoveImage() { + return Container( + height: 300.0, + width: double.infinity, + child: BlocBuilder( + cubit: postBloc, + builder: (context, state) { + if (state is OnImageFileRemoveChangeState) { + return WidgetItemImage( + onTab: (index, type) { + postBloc.add(OnImageFileRemoveChange( + type: type, + indexRemove: index, + urlTypes: state.urlTypes, + urls: state.urls)); + }, + urls: state.urls, + urlsType: state.urlTypes, + ); + } + return WidgetItemImage( + onTab: (index, type) { + postBloc.add(OnImageFileRemoveChange( + type: type, + indexRemove: index, + urlTypes: urlsType, + urls: urls)); + }, + urls: urls, + urlsType: urlsType, + ); + }, + ), + ); + } +} + +class WidgetItemImage extends StatelessWidget { + const WidgetItemImage({ + Key key, + this.urls, + this.urlsType, + this.onTab, + }) : super(key: key); + + final List urls; + final List urlsType; + final Function(int, String) onTab; + @override + Widget build(BuildContext context) { + return Container( + height: 300.0, + width: double.infinity, + child: ListView.builder( + scrollDirection: Axis.horizontal, + itemCount: urls.length, + itemBuilder: (context, index) { + switch (urlsType[index]) { + case "video": + return InkWell( + onTap: () { + onTab(index, "video"); + }, + child: Stack( + children: [ + PlayVideoList( + file: File(urls[index]), + height: 300.0, + ), + Positioned( + right: 16.0, + child: PhysicalModel( + color: Colors.white, + shadowColor: Colors.black, + elevation: 12.0, + shape: BoxShape.circle, + child: Icon(Icons.close), + ), + ) + ], ), - ) - : (urls == null) - ? Container( - height: 300.0, - ) - : Container( - height: 300.0, - child: ListView.builder( - itemCount: urls.length, - itemBuilder: (context, index) { - return urlsType[index] == "video" - ? PlayVideoList( - urls: urls[index], - height: 300.0, - ) - : Image.network( - urls[index], - fit: BoxFit.cover, - height: 300.0, - width: double.infinity, - ); - }, + ); + break; + case "video_url": + return InkWell( + onTap: () { + onTab(index, "video_url"); + }, + child: Stack( + children: [ + PlayVideoList( + urls: urls[index], + height: 300.0, ), - )); + Positioned( + right: 16.0, + child: PhysicalModel( + color: Colors.white, + shadowColor: Colors.black, + elevation: 12.0, + shape: BoxShape.circle, + child: Icon(Icons.close), + ), + ) + ], + ), + ); + break; + case "image": + return InkWell( + onTap: () { + onTab(index, "image"); + }, + child: Stack( + children: [ + Image.file( + File(urls[index]), + fit: BoxFit.cover, + height: 300.0, + ), + Positioned( + right: 16.0, + child: PhysicalModel( + color: Colors.white, + shadowColor: Colors.black, + elevation: 12.0, + shape: BoxShape.circle, + child: Icon(Icons.close), + ), + ) + ], + ), + ); + break; + case "image_url": + return InkWell( + onTap: () { + onTab(index, "image_url"); + }, + child: Stack( + children: [ + Image.network( + urls[index], + fit: BoxFit.cover, + height: 300.0, + ), + Positioned( + right: 16.0, + child: PhysicalModel( + color: Colors.white, + shadowColor: Colors.black, + elevation: 12.0, + shape: BoxShape.circle, + child: Icon(Icons.close), + ), + ) + ], + ), + ); + break; + default: + return Container(); + break; + } + }, + ), + ); } } diff --git a/lib/utils/utils.dart b/lib/utils/utils.dart index 17001081..7031dbc3 100644 --- a/lib/utils/utils.dart +++ b/lib/utils/utils.dart @@ -3,12 +3,16 @@ import 'dart:ui'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; +const TOKEN_URL = "http://172.30.128.1:8080/resocial/api/v1/generate/"; const PersonURL = "https://firebasestorage.googleapis.com/v0/b/flutter-resocial.appspot.com/o/download.png?alt=media&token=34d4da7d-7475-437b-a0ce-48f9e4018c65"; const Example_Profile = "https://miro.medium.com/max/1200/1*mk1-6aYaf_Bes1E3Imhc0A.jpeg"; +const CALL_ICON_USER = + "https://img.favpng.com/20/11/12/computer-icons-user-profile-png-favpng-0UAKKCpRRsMj5NaiELzw1pV7L.jpg"; + /// Future onLoadingDialog(BuildContext context, {String message}) async { return showGeneralDialog( diff --git a/lib/widgets/bottonBar/animate_bottom_bar.dart b/lib/widgets/bottonBar/animate_bottom_bar.dart index 9ba78a82..93b461c8 100644 --- a/lib/widgets/bottonBar/animate_bottom_bar.dart +++ b/lib/widgets/bottonBar/animate_bottom_bar.dart @@ -64,7 +64,7 @@ class _AnimationBottomBarState extends State } List _buildBarItems(NotifyBloc notifyBloc) { - List _barItems = List(); + List _barItems = []; for (int i = 0; i < widget.barItems.length; i++) { BarItem item = widget.barItems[i]; diff --git a/pubspec.lock b/pubspec.lock index 5fe39793..ca344752 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -14,7 +14,7 @@ packages: name: async url: "https://pub.dartlang.org" source: hosted - version: "2.6.1" + version: "2.8.1" badges: dependency: "direct main" description: @@ -49,7 +49,7 @@ packages: name: charcode url: "https://pub.dartlang.org" source: hosted - version: "1.2.0" + version: "1.3.1" clay_containers: dependency: "direct main" description: @@ -363,7 +363,7 @@ packages: name: meta url: "https://pub.dartlang.org" source: hosted - version: "1.3.0" + version: "1.7.0" mime: dependency: transitive description: @@ -585,7 +585,7 @@ packages: name: test_api url: "https://pub.dartlang.org" source: hosted - version: "0.3.0" + version: "0.4.2" timezone: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index 8a62670d..0346e00c 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -15,7 +15,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev # 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.0+2.2 +version: 1.0.0+2.3 environment: sdk: ">=2.7.0 <3.0.0"