diff --git a/lib/config/firebase_options.dart b/lib/config/firebase_options.dart index 3bacf8c57..93398d2af 100644 --- a/lib/config/firebase_options.dart +++ b/lib/config/firebase_options.dart @@ -55,15 +55,14 @@ class DefaultFirebaseOptions { ); static const FirebaseOptions android = FirebaseOptions( - apiKey: 'AIzaSyAyWBbl83WXzbVr6txyCmlUsZhpWomQfdg', + apiKey: 'AIzaSyAyWBbl83WXzbVr6txyCmlUsZhpWomQfdg', appId: '1:545984292675:android:d808acce7a80c20bb931f6', - messagingSenderId: '545984292675', - projectId: 'pangea-chat-936ee', - databaseURL: 'https://pangea-chat-936ee-default-rtdb.firebaseio.com', - storageBucket: 'pangea-chat-936ee.appspot.com', + messagingSenderId: '545984292675', + projectId: 'pangea-chat-936ee', + databaseURL: 'https://pangea-chat-936ee-default-rtdb.firebaseio.com', + storageBucket: 'pangea-chat-936ee.appspot.com', androidClientId: - '545984292675-2amsnoan1mt6lec1fld1a7eagu6gej7o.apps.googleusercontent.com' - ); + '545984292675-2amsnoan1mt6lec1fld1a7eagu6gej7o.apps.googleusercontent.com'); static const FirebaseOptions ios = FirebaseOptions( apiKey: 'AIzaSyCl8QZd9_PnaqJY2zLHCwlsmSWdq7hnH-U', diff --git a/lib/pages/chat/chat_view.dart b/lib/pages/chat/chat_view.dart index a08bdfcf0..bf565e303 100644 --- a/lib/pages/chat/chat_view.dart +++ b/lib/pages/chat/chat_view.dart @@ -463,4 +463,3 @@ class ConditionalScroll extends StatelessWidget { } } // #Pangea - diff --git a/lib/pages/chat_list/test.dart b/lib/pages/chat_list/test.dart index 22c34d193..3207c9637 100644 --- a/lib/pages/chat_list/test.dart +++ b/lib/pages/chat_list/test.dart @@ -1,49 +1,48 @@ +// void resetActiveSpaceId() { +// setState(() { +// activeSpaceId = null; +// }); +// } - // void resetActiveSpaceId() { - // setState(() { - // activeSpaceId = null; - // }); - // } +// void setActiveSpace(String? spaceId) { +// setState(() { +// activeSpaceId = spaceId; +// activeFilter = ActiveFilter.spaces; +// }); +// } - // void setActiveSpace(String? spaceId) { - // setState(() { - // activeSpaceId = spaceId; - // activeFilter = ActiveFilter.spaces; - // }); - // } +// int get selectedIndex { +// switch (activeFilter) { +// case ActiveFilter.allChats: +// case ActiveFilter.messages: +// return 0; +// case ActiveFilter.groups: +// return 1; +// case ActiveFilter.spaces: +// return AppConfig.separateChatTypes ? 2 : 1; +// } +// } - // int get selectedIndex { - // switch (activeFilter) { - // case ActiveFilter.allChats: - // case ActiveFilter.messages: - // return 0; - // case ActiveFilter.groups: - // return 1; - // case ActiveFilter.spaces: - // return AppConfig.separateChatTypes ? 2 : 1; - // } - // } +// ActiveFilter getActiveFilterByDestination(int? i) { +// switch (i) { +// case 1: +// if (AppConfig.separateChatTypes) { +// return ActiveFilter.groups; +// } +// return ActiveFilter.spaces; +// case 2: +// return ActiveFilter.spaces; +// case 0: +// default: +// if (AppConfig.separateChatTypes) { +// return ActiveFilter.messages; +// } +// return ActiveFilter.allChats; +// } +// } - // ActiveFilter getActiveFilterByDestination(int? i) { - // switch (i) { - // case 1: - // if (AppConfig.separateChatTypes) { - // return ActiveFilter.groups; - // } - // return ActiveFilter.spaces; - // case 2: - // return ActiveFilter.spaces; - // case 0: - // default: - // if (AppConfig.separateChatTypes) { - // return ActiveFilter.messages; - // } - // return ActiveFilter.allChats; - // } - // } - - // void onDestinationSelected(int? i) { - // setState(() { - // activeFilter = getActiveFilterByDestination(i); - // }); - // } \ No newline at end of file +// void onDestinationSelected(int? i) { +// setState(() { +// activeFilter = getActiveFilterByDestination(i); +// }); +// } diff --git a/lib/pangea/enum/direction.dart b/lib/pangea/enum/direction.dart index 9fa647749..9b1f9736a 100644 --- a/lib/pangea/enum/direction.dart +++ b/lib/pangea/enum/direction.dart @@ -1,3 +1 @@ -enum EditDirection { - append, remove -} \ No newline at end of file +enum EditDirection { append, remove } diff --git a/lib/pangea/models/analytics_model_old.dart b/lib/pangea/models/analytics_model_old.dart index 2c51a1f3a..8dc5159da 100644 --- a/lib/pangea/models/analytics_model_old.dart +++ b/lib/pangea/models/analytics_model_old.dart @@ -97,4 +97,4 @@ // Map toJson() => {}; // } -// // maybe search how to do date ranges in dart \ No newline at end of file +// // maybe search how to do date ranges in dart diff --git a/lib/pangea/pages/class_settings/p_class_widgets/class_name_button.dart b/lib/pangea/pages/class_settings/p_class_widgets/class_name_button.dart index 56362fd0e..cca0df0d3 100644 --- a/lib/pangea/pages/class_settings/p_class_widgets/class_name_button.dart +++ b/lib/pangea/pages/class_settings/p_class_widgets/class_name_button.dart @@ -22,10 +22,8 @@ class ClassNameButton extends StatelessWidget { onTap: controller.setDisplaynameAction, title: Text( room.isSpace - ? L10n.of(context)! - .changeTheNameOfTheClass - : L10n.of(context)! - .changeTheNameOfTheChat, + ? L10n.of(context)!.changeTheNameOfTheClass + : L10n.of(context)!.changeTheNameOfTheChat, style: TextStyle( color: Theme.of(context).colorScheme.secondary, fontWeight: FontWeight.bold, diff --git a/lib/pangea/pages/class_settings/p_class_widgets/class_show_edit_dialog.dart b/lib/pangea/pages/class_settings/p_class_widgets/class_show_edit_dialog.dart index 7752cae7a..3d058e8d9 100644 --- a/lib/pangea/pages/class_settings/p_class_widgets/class_show_edit_dialog.dart +++ b/lib/pangea/pages/class_settings/p_class_widgets/class_show_edit_dialog.dart @@ -1,4 +1,3 @@ - import 'package:adaptive_dialog/adaptive_dialog.dart'; import 'package:flutter/material.dart'; import 'package:flutter_gen/gen_l10n/l10n.dart'; diff --git a/lib/pangea/pages/sign_up/signup_view.dart b/lib/pangea/pages/sign_up/signup_view.dart index 65a6f1eaf..ba673216a 100644 --- a/lib/pangea/pages/sign_up/signup_view.dart +++ b/lib/pangea/pages/sign_up/signup_view.dart @@ -77,11 +77,11 @@ class SignupPageView extends StatelessWidget { hintText: L10n.of(context)!.repeatPassword, errorStyle: const TextStyle(color: Colors.orange), // #Pangea - fillColor: Theme.of(context) - .colorScheme - .background - .withOpacity(0.75), - // #Pangea + fillColor: Theme.of(context) + .colorScheme + .background + .withOpacity(0.75), + // #Pangea ), ), ), diff --git a/lib/pangea/repo/full_text_translation_repo.dart b/lib/pangea/repo/full_text_translation_repo.dart index a9a13bc87..4be05da57 100644 --- a/lib/pangea/repo/full_text_translation_repo.dart +++ b/lib/pangea/repo/full_text_translation_repo.dart @@ -75,12 +75,12 @@ class FullTextTranslationResponseModel { factory FullTextTranslationResponseModel.fromJson(Map json) { return FullTextTranslationResponseModel( - translations: (json["translations"] as Iterable) - .map( - (e) => e, - ) - .toList() - .cast(), + translations: (json["translations"] as Iterable) + .map( + (e) => e, + ) + .toList() + .cast(), source: json[ModelKey.srcLang], deepL: json['deepl_res'], ); diff --git a/lib/pangea/utils/password_forgotten.dart b/lib/pangea/utils/password_forgotten.dart index 7c7344cb6..e117e9f06 100644 --- a/lib/pangea/utils/password_forgotten.dart +++ b/lib/pangea/utils/password_forgotten.dart @@ -127,13 +127,13 @@ extension PangeaPasswordForgotten on LoginController { ScaffoldMessenger.of(context).showSnackBar( SnackBar( content: Text( - L10n.of(context)! - .passwordHasBeenChanged, + L10n.of(context)!.passwordHasBeenChanged, ), ), ); usernameController.text = emailController.text; - passwordController.text = newPasswordController.text; + passwordController.text = + newPasswordController.text; login(); } }, @@ -149,4 +149,4 @@ extension PangeaPasswordForgotten on LoginController { ), ); } -} \ No newline at end of file +} diff --git a/lib/pangea/utils/set_class_topic.dart b/lib/pangea/utils/set_class_topic.dart index 3a3dae77a..1f01a3b20 100644 --- a/lib/pangea/utils/set_class_topic.dart +++ b/lib/pangea/utils/set_class_topic.dart @@ -4,47 +4,47 @@ import 'package:matrix/matrix.dart'; import 'package:flutter_gen/gen_l10n/l10n.dart'; void setClassTopic(Room room, BuildContext context) { - final TextEditingController textFieldController = - TextEditingController(text: room.topic); - showDialog( - context: context, - useRootNavigator: false, - builder: (BuildContext context) => AlertDialog( - title: Text( - room.isSpace - ? L10n.of(context)!.classDescription - : L10n.of(context)!.chatTopic, - ), - content: TextField( - controller: textFieldController, - ), - actions: [ - TextButton( - child: Text(L10n.of(context)!.cancel), - onPressed: () { - Navigator.of(context).pop(); - }, - ), - TextButton( - child: Text(L10n.of(context)!.ok), - onPressed: () async { - if (textFieldController.text == "") return; - final success = await showFutureLoadingDialog( - context: context, - future: () => room.setDescription(textFieldController.text), - ); - if (success.error == null) { - ScaffoldMessenger.of(context).showSnackBar( - SnackBar( - content: - Text(L10n.of(context)!.groupDescriptionHasBeenChanged), - ), - ); - Navigator.of(context).pop(); - } - }, - ), - ], + final TextEditingController textFieldController = + TextEditingController(text: room.topic); + showDialog( + context: context, + useRootNavigator: false, + builder: (BuildContext context) => AlertDialog( + title: Text( + room.isSpace + ? L10n.of(context)!.classDescription + : L10n.of(context)!.chatTopic, ), - ); -} \ No newline at end of file + content: TextField( + controller: textFieldController, + ), + actions: [ + TextButton( + child: Text(L10n.of(context)!.cancel), + onPressed: () { + Navigator.of(context).pop(); + }, + ), + TextButton( + child: Text(L10n.of(context)!.ok), + onPressed: () async { + if (textFieldController.text == "") return; + final success = await showFutureLoadingDialog( + context: context, + future: () => room.setDescription(textFieldController.text), + ); + if (success.error == null) { + ScaffoldMessenger.of(context).showSnackBar( + SnackBar( + content: + Text(L10n.of(context)!.groupDescriptionHasBeenChanged), + ), + ); + Navigator.of(context).pop(); + } + }, + ), + ], + ), + ); +} diff --git a/lib/pangea/widgets/common/bot_face_svg.dart b/lib/pangea/widgets/common/bot_face_svg.dart index 4fcf07fee..54143626e 100644 --- a/lib/pangea/widgets/common/bot_face_svg.dart +++ b/lib/pangea/widgets/common/bot_face_svg.dart @@ -33,4 +33,4 @@ class BotFace extends StatelessWidget { // String toShortString() { // return toString().split('.').last; // } -// } \ No newline at end of file +// } diff --git a/lib/pangea/widgets/common/star_rating.dart b/lib/pangea/widgets/common/star_rating.dart index 556b1cd09..b2a7d56f5 100644 --- a/lib/pangea/widgets/common/star_rating.dart +++ b/lib/pangea/widgets/common/star_rating.dart @@ -21,7 +21,8 @@ class StarRating extends StatelessWidget { if (index >= rating) { icon = const Icon( Icons.star_border, - size: 20, color: Color(0xffFFC403), + size: 20, + color: Color(0xffFFC403), ); } else if (index > rating - 1 && index < rating) { icon = Icon( diff --git a/lib/pangea/widgets/igc/span_data.dart b/lib/pangea/widgets/igc/span_data.dart index 067adc5d8..892c245a1 100644 --- a/lib/pangea/widgets/igc/span_data.dart +++ b/lib/pangea/widgets/igc/span_data.dart @@ -49,11 +49,10 @@ class SpanData { offset: json['offset'], length: json['length'], fullText: json['full_text'], - context: json['context'] != null - ? Context.fromJson(json['context']) - : null, + context: + json['context'] != null ? Context.fromJson(json['context']) : null, type: SpanDataTypeEnum.values.firstWhereOrNull( - (e) => e.toString() == 'SpanDataTypeEnum.${json['type']}') ?? + (e) => e.toString() == 'SpanDataTypeEnum.${json['type']}') ?? SpanDataTypeEnum.correction, rule: json['rule'] != null ? Rule.fromJson(json['rule']) : null, ); @@ -67,8 +66,7 @@ class SpanData { data['choices'] = choices!.map((x) => x.toJson()).toList(); } if (replacements != null) { - data['replacements'] = - replacements!.map((x) => x.toJson()).toList(); + data['replacements'] = replacements!.map((x) => x.toJson()).toList(); } data['offset'] = offset; data['length'] = length; @@ -83,6 +81,7 @@ class SpanData { return data; } } + class Context { String sentence; int offset; @@ -181,4 +180,3 @@ class SpanDataType { return data; } } - diff --git a/lib/pangea/word_cloud/word_cloud.dart b/lib/pangea/word_cloud/word_cloud.dart index 4a51ab761..d33245a6c 100644 --- a/lib/pangea/word_cloud/word_cloud.dart +++ b/lib/pangea/word_cloud/word_cloud.dart @@ -5,4 +5,4 @@ export 'word_cloud_setting.dart'; export 'word_cloud_shape.dart'; export 'word_cloud_tap_view.dart'; export 'word_cloud_tap.dart'; -export 'word_cloud_view.dart'; \ No newline at end of file +export 'word_cloud_view.dart'; diff --git a/lib/pangea/word_cloud/word_cloud_shape.dart b/lib/pangea/word_cloud/word_cloud_shape.dart index 2c5b1bd83..afc03b328 100644 --- a/lib/pangea/word_cloud/word_cloud_shape.dart +++ b/lib/pangea/word_cloud/word_cloud_shape.dart @@ -39,6 +39,4 @@ class WordCloudEllipse extends WordCloudShape { double getMinorAxis() { return minoraxis; } - - } diff --git a/test/choreographer_test.dart b/test/choreographer_test.dart index e69de29bb..8b1378917 100644 --- a/test/choreographer_test.dart +++ b/test/choreographer_test.dart @@ -0,0 +1 @@ +