This commit is contained in:
Brord van Wierst 2023-12-04 03:36:44 +01:00
parent dc0c2ed08f
commit 75112808f6
No known key found for this signature in database
GPG key ID: 20E7ACBD8E02BC11
155 changed files with 492 additions and 527 deletions

View file

@ -34,6 +34,6 @@ jobs:
uses: peaceiris/actions-gh-pages@v3
with:
personal_token: ${{ secrets.PAGES_DEPLOY_TOKEN }}
publish_dir: ./public
publish_dir: ./public/web
publish_branch: gh-pages
# cname: app.staging.pangea.chat.im

View file

@ -64,7 +64,7 @@ class DefaultFirebaseOptions {
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',

View file

@ -9,8 +9,7 @@ import 'edit_widgets_dialog.dart';
class CupertinoWidgetsBottomSheet extends StatelessWidget {
final Room room;
const CupertinoWidgetsBottomSheet({Key? key, required this.room})
: super(key: key);
const CupertinoWidgetsBottomSheet({super.key, required this.room});
@override
Widget build(BuildContext context) {

View file

@ -9,7 +9,7 @@ import 'edit_widgets_dialog.dart';
class WidgetsBottomSheet extends StatelessWidget {
final Room room;
const WidgetsBottomSheet({Key? key, required this.room}) : super(key: key);
const WidgetsBottomSheet({super.key, required this.room});
@override
Widget build(BuildContext context) {

View file

@ -231,7 +231,7 @@ class Choreographer {
_textController.text + step.continuances[step.chosen!].text,
step.continuances[step.chosen!].gold
? EditType.itGold
: EditType.itStandard);
: EditType.itStandard,);
_textController.selection =
TextSelection.collapsed(offset: _textController.text.length);
giveInputFocus();
@ -329,14 +329,14 @@ class Choreographer {
igc.igcTextData!.matches[matchIndex].status = PangeaMatchStatus.ignored;
choreoRecord.addRecord(_textController.text,
match: igc.igcTextData!.matches[matchIndex]);
match: igc.igcTextData!.matches[matchIndex],);
igc.igcTextData!.matches.removeAt(matchIndex);
} catch (err, stack) {
debugger(when: kDebugMode);
Sentry.addBreadcrumb(
Breadcrumb.fromJson(
{"igcTextData": igc.igcTextData?.toJson(), "offset": cursorOffset}),
{"igcTextData": igc.igcTextData?.toJson(), "offset": cursorOffset},),
);
ErrorHandler.logError(
e: err,
@ -452,7 +452,7 @@ class Choreographer {
bool get _useCustomInput => [
EditType.keyboard,
EditType.igc,
EditType.alternativeTranslation
EditType.alternativeTranslation,
].contains(_textController.editType);
bool get editTypeIsKeyboard => EditType.keyboard == _textController.editType;

View file

@ -202,7 +202,7 @@ class IgcController {
if (igcTextData!.originalInput != choreographer.currentText) {
debugPrint(
"returning isIGCTextDataRelevant false because text has changed");
"returning isIGCTextDataRelevant false because text has changed",);
return false;
}
return true;

View file

@ -76,8 +76,8 @@ class ITController {
Sentry.addBreadcrumb(
Breadcrumb(message: "choreo context", data: {
"igcTextData": choreographer.igc.igcTextData?.toJson(),
"currentText": choreographer.currentText
}),
"currentText": choreographer.currentText,
},),
);
throw Exception("null _itStartData or empty text in _setSourceText");
}
@ -125,7 +125,7 @@ class ITController {
completedITSteps.add(ITStep(
currentITStep!.continuances,
customInput: currentText,
));
),);
}
currentITStep = null;
@ -419,7 +419,7 @@ class CurrentITStep {
}
return e;
}),
goldCont
goldCont,
];
continuances.shuffle();
} else {

View file

@ -17,7 +17,7 @@ class ChoicesArray extends StatelessWidget {
final String originalSpan;
final String Function(int) uniqueKeyForLayerLink;
const ChoicesArray({
Key? key,
super.key,
required this.isLoading,
required this.choices,
required this.onPressed,
@ -25,7 +25,7 @@ class ChoicesArray extends StatelessWidget {
required this.uniqueKeyForLayerLink,
required this.selectedChoiceIndex,
this.onLongPress,
}) : super(key: key);
});
@override
Widget build(BuildContext context) {
@ -64,13 +64,12 @@ class Choice {
class ChoiceItem extends StatelessWidget {
const ChoiceItem(
{Key? key,
{super.key,
required this.theme,
required this.onLongPress,
required this.onPressed,
required this.entry,
required this.isSelected})
: super(key: key);
required this.isSelected,});
final MapEntry<int, Choice> entry;
final ThemeData theme;
@ -102,7 +101,7 @@ class ChoiceItem extends StatelessWidget {
child: TextButton(
style: ButtonStyle(
padding: MaterialStateProperty.all(
const EdgeInsets.symmetric(horizontal: 7)),
const EdgeInsets.symmetric(horizontal: 7),),
//if index is selected, then give the background a slight primary color
backgroundColor: MaterialStateProperty.all<Color>(
entry.value.color != null

View file

@ -10,11 +10,11 @@ class Counter extends StatelessWidget {
final String label;
final Color color;
const Counter({
Key? key,
super.key,
required this.count,
required this.label,
required this.color,
}) : super(key: key);
});
@override
Widget build(BuildContext context) {
@ -49,12 +49,12 @@ class CounterDisplay extends StatelessWidget {
final int yellow;
final int custom;
const CounterDisplay({
Key? key,
super.key,
required this.correct,
required this.incorrect,
required this.yellow,
required this.custom,
}) : super(key: key);
});
@override
Widget build(BuildContext context) {

View file

@ -10,8 +10,8 @@ class ChoreographerHasErrorButton extends StatelessWidget {
const ChoreographerHasErrorButton(
this.pangeaController,
this.error, {
Key? key,
}) : super(key: key);
super.key,
});
@override
Widget build(BuildContext context) {
@ -24,7 +24,7 @@ class ChoreographerHasErrorButton extends StatelessWidget {
SnackBar(
duration: const Duration(seconds: 5),
content: Text(
"${error.title(context)} ${error.description(context)}"),
"${error.title(context)} ${error.description(context)}",),
),
);
} else if (error.type == ChoreoErrorType.unsubscribed) {

View file

@ -17,7 +17,7 @@ import 'choice_array.dart';
class ITBar extends StatelessWidget {
final Choreographer choreographer;
const ITBar({Key? key, required this.choreographer}) : super(key: key);
const ITBar({super.key, required this.choreographer});
ITController get controller => choreographer.itController;
@ -36,7 +36,7 @@ class ITBar extends StatelessWidget {
borderRadius: const BorderRadius.only(
topLeft: Radius.circular(AppConfig.borderRadius),
topRight: Radius.circular(AppConfig.borderRadius),
)),
),),
width: double.infinity,
padding: const EdgeInsets.fromLTRB(0, 3, 3, 3),
child: Stack(
@ -89,7 +89,7 @@ class ITBar extends StatelessWidget {
? ChoiceFeedbackText(controller: controller)
: controller.isTranslationDone
? TranslationFeedback(
controller: controller)
controller: controller,)
: ITChoices(controller: controller),
),
),
@ -111,9 +111,9 @@ class ITBar extends StatelessWidget {
class ChoiceFeedbackText extends StatelessWidget {
const ChoiceFeedbackText({
Key? key,
super.key,
required this.controller,
}) : super(key: key);
});
final ITController controller;
@ -140,9 +140,9 @@ class ChoiceFeedbackText extends StatelessWidget {
class OriginalText extends StatelessWidget {
const OriginalText({
Key? key,
super.key,
required this.controller,
}) : super(key: key);
});
final ITController controller;
@ -155,7 +155,7 @@ class OriginalText extends StatelessWidget {
borderRadius: BorderRadius.only(
topLeft: Radius.circular(AppConfig.borderRadius),
topRight: Radius.circular(AppConfig.borderRadius),
)),
),),
child: Row(
//PTODO - does this already update after reset or we need to setState?
mainAxisAlignment: MainAxisAlignment.center,
@ -192,9 +192,9 @@ class OriginalText extends StatelessWidget {
class ITChoices extends StatelessWidget {
const ITChoices({
Key? key,
super.key,
required this.controller,
}) : super(key: key);
});
// final choices = [
// "we need a really long translation to see what's going to happen with that. it should probably have multiple sentences so that we can see what happens there.we need a really long translation to see what's going to happen with that. it should probably have multiple sentences so that we can see what happens there.",
@ -215,7 +215,7 @@ class ITChoices extends StatelessWidget {
}
void showCard(BuildContext context, int index,
[Color? borderColor, String? choiceFeedback]) =>
[Color? borderColor, String? choiceFeedback,]) =>
OverlayUtil.showPositionedCard(
context: context,
cardToShow: WordDataCard(
@ -227,7 +227,7 @@ class ITChoices extends StatelessWidget {
: controller.targetLangCode,
hasInfo: controller.currentITStep!.continuances[index].hasInfo,
choiceFeedback: choiceFeedback,
room: controller.choreographer.chatController.room),
room: controller.choreographer.chatController.room,),
cardSize: const Size(300, 300),
borderColor: borderColor,
transformTargetId: controller.choreographer.itBarTransformTargetKey,
@ -260,7 +260,7 @@ class ITChoices extends StatelessWidget {
debugPrint("is gold? ${continuance.gold}");
if (continuance.level == 1 || continuance.wasClicked) {
Future.delayed(const Duration(milliseconds: 500),
() => controller.selectTranslation(index));
() => controller.selectTranslation(index),);
} else {
showCard(
context,
@ -290,8 +290,7 @@ class ITChoices extends StatelessWidget {
class ITError extends StatelessWidget {
final ITController controller;
final Object error;
const ITError({Key? key, required this.error, required this.controller})
: super(key: key);
const ITError({super.key, required this.error, required this.controller});
@override
Widget build(BuildContext context) {
@ -309,7 +308,7 @@ class ITError extends StatelessWidget {
// Haga clic en su mensaje para ver los significados de las palabras.
style: TextStyle(
fontStyle: FontStyle.italic,
color: Theme.of(context).colorScheme.error),
color: Theme.of(context).colorScheme.error,),
),
),
ITRestartButton(controller: controller),

View file

@ -9,9 +9,9 @@ import '../controllers/it_controller.dart';
class ITCloseButton extends StatelessWidget {
const ITCloseButton({
Key? key,
super.key,
required this.choreographer,
}) : super(key: key);
});
final Choreographer choreographer;
@ -31,7 +31,7 @@ class ITCloseButton extends StatelessWidget {
}
class ITBotButton extends StatelessWidget {
const ITBotButton({Key? key, required this.choreographer}) : super(key: key);
const ITBotButton({super.key, required this.choreographer});
final Choreographer choreographer;
@ -58,9 +58,9 @@ class ITBotButton extends StatelessWidget {
class ITRestartButton extends StatelessWidget {
ITRestartButton({
Key? key,
super.key,
required this.controller,
}) : super(key: key);
});
final ITController controller;
final PangeaController pangeaController = MatrixState.pangeaController;

View file

@ -5,19 +5,19 @@ import 'package:flutter/material.dart';
import 'package:fluffychat/config/app_config.dart';
class ItShimmer extends StatelessWidget {
const ItShimmer({Key? key, required this.originalSpan}) : super(key: key);
const ItShimmer({super.key, required this.originalSpan});
final String originalSpan;
Iterable<Widget> renderShimmerIfListEmpty(BuildContext context,
{int noOfBars = 3}) {
{int noOfBars = 3,}) {
final List<String> dummyStrings = [];
for (int i = 0; i < noOfBars; i++) {
dummyStrings.add(originalSpan);
}
return dummyStrings.map((e) => ITShimmerElement(
text: e,
));
),);
}
// PTODO - bring this back, make it shimmer
@ -32,9 +32,9 @@ class ItShimmer extends StatelessWidget {
class ITShimmerElement extends StatelessWidget {
const ITShimmerElement({
Key? key,
super.key,
required this.text,
}) : super(key: key);
});
final String text;
@ -57,14 +57,14 @@ class ITShimmerElement extends StatelessWidget {
child: TextButton(
style: ButtonStyle(
padding: MaterialStateProperty.all(
const EdgeInsets.symmetric(horizontal: 7)),
const EdgeInsets.symmetric(horizontal: 7),),
shape: MaterialStateProperty.all(
RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10),
),
),
backgroundColor: MaterialStateProperty.all<Color>(
AppConfig.primaryColor.withOpacity(0.2)),
AppConfig.primaryColor.withOpacity(0.2),),
),
onPressed: () {},
child: Text(

View file

@ -7,9 +7,9 @@ import '../../../pages/chat/chat.dart';
class LanguageDisplayToggle extends StatelessWidget {
const LanguageDisplayToggle({
Key? key,
super.key,
required this.controller,
}) : super(key: key);
});
final ChatController controller;

View file

@ -26,10 +26,10 @@ class LanguagePermissionsButtons extends StatelessWidget {
final Choreographer choreographer;
const LanguagePermissionsButtons({
Key? key,
super.key,
required this.roomID,
required this.choreographer,
}) : super(key: key);
});
@override
Widget build(BuildContext context) {

View file

@ -7,9 +7,9 @@ import '../../../pages/chat/chat.dart';
class ChoreographerSendButton extends StatelessWidget {
const ChoreographerSendButton({
Key? key,
super.key,
required this.controller,
}) : super(key: key);
});
final ChatController controller;

View file

@ -7,8 +7,7 @@ import 'choice_array.dart';
class TranslationFeedback extends StatelessWidget {
final ITController controller;
const TranslationFeedback({Key? key, required this.controller})
: super(key: key);
const TranslationFeedback({super.key, required this.controller});
@override
Widget build(BuildContext context) {
@ -59,9 +58,9 @@ class TranslationFeedback extends StatelessWidget {
class AlternativeTranslations extends StatelessWidget {
const AlternativeTranslations({
Key? key,
super.key,
required this.controller,
}) : super(key: key);
});
final ITController controller;
@ -73,12 +72,12 @@ class AlternativeTranslations extends StatelessWidget {
controller.choreographer.altTranslator.loadingAlternativeTranslations,
// choices: controller.choreographer.altTranslator.similarityResponse.scores
choices: [
Choice(text: controller.choreographer.altTranslator.translations.first)
Choice(text: controller.choreographer.altTranslator.translations.first),
],
// choices: controller.choreographer.altTranslator.translations,
onPressed: (int index) {
controller.choreographer.onSelectAlternativeTranslation(
controller.choreographer.altTranslator.translations[index]);
controller.choreographer.altTranslator.translations[index],);
},
uniqueKeyForLayerLink: (int index) => "altTranslation$index",
selectedChoiceIndex: null,

View file

@ -1,8 +1,6 @@
import 'package:flutter/foundation.dart';
import 'package:flutter_dotenv/flutter_dotenv.dart';
import '../../utils/platform_infos.dart';
class Environment {
static bool get itIsTime =>

View file

@ -22,12 +22,12 @@ class ContextualDefinitionController {
}
_ContextualDefinitionCacheItem? _getLocal(
ContextualDefinitionRequestModel req) =>
ContextualDefinitionRequestModel req,) =>
_definitions.firstWhereOrNull(
(e) => e.word == req.word && e.fullText == req.fullText);
(e) => e.word == req.word && e.fullText == req.fullText,);
Future<ContextualDefinitionResponseModel?> get(
ContextualDefinitionRequestModel req) {
ContextualDefinitionRequestModel req,) {
final _ContextualDefinitionCacheItem? localItem = _getLocal(req);
if (localItem != null) return localItem.data;
@ -55,7 +55,7 @@ class ContextualDefinitionController {
return res;
} catch (err, stack) {
debugPrint(
"error getting contextual definition for ${request.word} in '${request.fullText}'");
"error getting contextual definition for ${request.word} in '${request.fullText}'",);
ErrorHandler.logError(e: err, s: stack, data: request.toJson());
return null;
}
@ -120,14 +120,14 @@ class ContextualDefinitionRequestModel {
required this.word,
required this.feedbackLang,
required this.fullTextLang,
required this.wordLang});
required this.wordLang,});
Map<String, dynamic> toJson() => {
ModelKey.fullText: fullText,
ModelKey.word: word,
ModelKey.lang: feedbackLang,
ModelKey.fullTextLang: fullTextLang,
ModelKey.wordLang: wordLang
ModelKey.wordLang: wordLang,
};
}

View file

@ -36,7 +36,7 @@ class PangeaLanguage {
}
_langList.removeWhere((element) =>
LanguageModel.codeFromNameOrCode(element.langCode) ==
LanguageKeys.unknownLanguage);
LanguageKeys.unknownLanguage,);
_langList.sort((a, b) => a.displayName.compareTo(b.displayName));
_langList.insert(0, LanguageModel.multiLingual());
} catch (err, stack) {
@ -64,7 +64,7 @@ class PangeaLanguage {
static Future<void> _saveFlags(List<LanguageModel> langFlags) async {
final Map flagMap = {
PrefKey.flags: langFlags.map((e) => e.toJson()).toList()
PrefKey.flags: langFlags.map((e) => e.toJson()).toList(),
};
await MyShared.saveJson(PrefKey.flags, flagMap);
}

View file

@ -124,7 +124,7 @@ class AnalyticsController extends BaseController {
} else {
if (studentId != null) {
studentAnalyticsSummaryEvents = [
await classRoom.getStudentAnalytics(studentId)
await classRoom.getStudentAnalytics(studentId),
];
} else {
studentAnalyticsSummaryEvents = await classRoom.getClassAnalytics();
@ -159,7 +159,7 @@ class AnalyticsController extends BaseController {
studentId: studentId,
chatId: chatId,
chartAnalyticsModel: newModel,
));
),);
return newModel;
} catch (err, s) {
@ -171,7 +171,7 @@ class AnalyticsController extends BaseController {
Future<VocabHeadwords> vocabHeadwordsWithTotals(
String langCode, List<ConstructEvent> vocab,
[String? chatId]) async {
[String? chatId,]) async {
final VocabHeadwords vocabHeadwords =
await VocabHeadwords.getHeadwords(langCode);
for (final vocabList in vocabHeadwords.lists) {
@ -214,7 +214,7 @@ class AnalyticsController extends BaseController {
for (final event in studentAnalyticsSummaryEvents) {
if (event != null) {
msgs.addAll(event.content.messages
.where((m) => directChatIds.contains(m.chatId)));
.where((m) => directChatIds.contains(m.chatId)),);
} else {
debugPrint("studentAnalyticsSummaryEvent is null");
}
@ -231,7 +231,7 @@ class AnalyticsController extends BaseController {
studentId: null,
chatId: AnalyticsEntryType.privateChats.toString(),
chartAnalyticsModel: newModel,
));
),);
return newModel;
} catch (err, s) {
@ -251,7 +251,7 @@ class AnalyticsController extends BaseController {
}
Future<List<ConstructEvent>> studentConstructs(
String studentId, String langCode) {
String studentId, String langCode,) {
final Room? analyticsRoom = _pangeaController.matrixState.client
.analyticsRoomLocal(langCode, studentId);
return analyticsRoom!.allConstructEvents;
@ -385,14 +385,14 @@ class AnalyticsController extends BaseController {
chatIdsToFilterBy.addAll(_pangeaController.matrixState.client
.getRoomById(defaultSelected.id)
?.childrenAndGrandChildrenDirectChatIds ??
[]);
[],);
} else if (defaultSelected.type == AnalyticsEntryType.space) {
chatIdsToFilterBy.addAll(_pangeaController.matrixState.client
.getRoomById(defaultSelected.id)
?.childrenAndGrandChildren
.where((e) => e.roomId != null)
.map((e) => e.roomId!) ??
[]);
[],);
}
if (chatIdsToFilterBy.isNotEmpty) {
for (final event in events) {

View file

@ -31,7 +31,7 @@ class MessageDataController extends BaseController {
CacheItem? getItem(String parentId, String type, String langCode) =>
_cache.firstWhereOrNull((e) =>
e.parentId == parentId && e.type == type && e.langCode == langCode);
e.parentId == parentId && e.type == type && e.langCode == langCode,);
Future<PangeaMessageTokens?> _getTokens(
TokensRequestModel req,
@ -66,7 +66,7 @@ class MessageDataController extends BaseController {
} catch (err, stack) {
Sentry.addBreadcrumb(
Breadcrumb(
message: "err in _getTokenEvent with repEventId $repEventId"),
message: "err in _getTokenEvent with repEventId $repEventId",),
);
Sentry.addBreadcrumb(
Breadcrumb.fromJson({"req": req.toJson()}),
@ -99,7 +99,7 @@ class MessageDataController extends BaseController {
req: req,
room: room,
),
));
),);
return _cache.last.data;
}
@ -201,7 +201,7 @@ class MessageDataQueueItem {
UseType useType;
MessageDataQueueItem(
this.transactionId, this.repTokensAndRecords, this.useType
this.transactionId, this.repTokensAndRecords, this.useType,
// required this.recentMessageRecord,
);
}

View file

@ -24,13 +24,13 @@ class MyAnalyticsController {
//PTODO - locally cache and update periodically
Future<void> handleMessage(
Room room, RecentMessageRecord messageRecord) async {
Room room, RecentMessageRecord messageRecord,) async {
try {
debugPrint("in handle message with type ${messageRecord.useType}");
if (_userId == null) {
debugger(when: kDebugMode);
ErrorHandler.logError(
m: "null userId in updateAnalytics", s: StackTrace.current);
m: "null userId in updateAnalytics", s: StackTrace.current,);
return;
}
@ -55,7 +55,7 @@ class MyAnalyticsController {
}
Future<List<StudentAnalyticsEvent?>> analyticsEvents(
List<Room> spaces) async {
List<Room> spaces,) async {
final List<Future<StudentAnalyticsEvent?>> events = [];
for (final space in spaces) {
events.add(space.getStudentAnalytics(_userId!));
@ -69,7 +69,7 @@ class MyAnalyticsController {
);
Future<void> saveConstructsMixed(
List<OneConstructUse> allUses, String langCode) async {
List<OneConstructUse> allUses, String langCode,) async {
try {
final Map<String, List<OneConstructUse>> aggregatedVocabUse = {};
for (final use in allUses) {
@ -84,7 +84,7 @@ class MyAnalyticsController {
debugPrint("saving of type ${uses.value.first.constructType}");
saveFutures.add(
analyticsRoom.saveConstructUsesSameLemma(
uses.key, uses.value.first.constructType!, uses.value),
uses.key, uses.value.first.constructType!, uses.value,),
);
}

View file

@ -88,7 +88,7 @@ class SubscriptionController extends BaseController {
}
Future<void> showPaywall(BuildContext context,
[bool forceShow = false]) async {
[bool forceShow = false,]) async {
try {
if (!initialized) {
await initialize();
@ -157,7 +157,7 @@ class SubscriptionController extends BaseController {
void submitSubscriptionChange(
SubscriptionDetails? selectedSubscription, BuildContext context,
{bool isPromo = false}) async {
{bool isPromo = false,}) async {
if (selectedSubscription != null) {
if (kIsWeb) {
if (selectedSubscription.duration == null) {
@ -187,7 +187,7 @@ class SubscriptionController extends BaseController {
}
try {
GoogleAnalytics.beginPurchaseSubscription(
selectedSubscription, context);
selectedSubscription, context,);
await Purchases.purchasePackage(selectedSubscription.package!);
GoogleAnalytics.updateUserSubscriptionStatus(true);
} catch (err) {

View file

@ -27,7 +27,7 @@ class WordController extends BaseController {
f: fullText,
l1: userL1,
l2: userL2,
));
),);
Future<WordData> getWordDataGlobal({
required String word,

View file

@ -19,25 +19,25 @@ extension PangeaClient on Client {
List<Room> get classesImTeaching => rooms
.where((e) =>
e.isPangeaClass &&
e.ownPowerLevel == ClassDefaultValues.powerLevelOfAdmin)
e.ownPowerLevel == ClassDefaultValues.powerLevelOfAdmin,)
.toList();
List<Room> get classesAndExchangesImTeaching => rooms
.where((e) =>
(e.isPangeaClass || e.isExchange) &&
e.ownPowerLevel == ClassDefaultValues.powerLevelOfAdmin)
e.ownPowerLevel == ClassDefaultValues.powerLevelOfAdmin,)
.toList();
List<Room> get classesImIn => rooms
.where((e) =>
e.isPangeaClass &&
e.ownPowerLevel < ClassDefaultValues.powerLevelOfAdmin)
e.ownPowerLevel < ClassDefaultValues.powerLevelOfAdmin,)
.toList();
List<Room> get classesAndExchangesImStudyingIn => rooms
.where((e) =>
(e.isPangeaClass || e.isExchange) &&
e.ownPowerLevel < ClassDefaultValues.powerLevelOfAdmin)
e.ownPowerLevel < ClassDefaultValues.powerLevelOfAdmin,)
.toList();
List<Room> get classesAndExchangesImIn =>
@ -101,7 +101,7 @@ extension PangeaClient on Client {
analyticsRoom
.join()
.onError((error, stackTrace) =>
ErrorHandler.logError(e: error, s: stackTrace))
ErrorHandler.logError(e: error, s: stackTrace),)
.then((value) => analyticsRoom.postLoad());
return analyticsRoom;
}
@ -112,14 +112,14 @@ extension PangeaClient on Client {
final String roomID = await createRoom(
creationContent: {
'type': PangeaRoomTypes.analytics,
ModelKey.langCode: langCode
ModelKey.langCode: langCode,
},
name: "$userID $langCode Analytics",
topic: "This room stores learning analytics for $userID.",
invite: [
...(await myTeachers).map((e) => e.id).toList(),
...(await myTeachers).map((e) => e.id),
// BotName.localBot,
BotName.byEnvironment
BotName.byEnvironment,
],
visibility: Visibility.private,
roomAliasName: "${userID!.localpart}_${langCode}_analytics",

View file

@ -753,7 +753,7 @@ extension PangeaRoom on Room {
final toAdd = [
...getParticipants([Membership.invite, Membership.join])
.map((e) => e.id)
.toList(),
,
BotName.byEnvironment,
];
for (final teacher in await client.myTeachers) {

View file

@ -25,7 +25,7 @@ class TimeSeriesTotals {
UseType.ta.string: ta,
UseType.ga.string: ga,
UseType.wa.string: wa,
UseType.un.string: un
UseType.un.string: un,
};
factory TimeSeriesTotals.fromJson(json) => TimeSeriesTotals(
@ -77,7 +77,7 @@ class TimeSeriesInterval {
Map<String, dynamic> toJson() => {
"strt": start.toIso8601String(),
"end": end.toIso8601String(),
"totals": totals.toJson()
"totals": totals.toJson(),
};
factory TimeSeriesInterval.fromJson(json) => TimeSeriesInterval(

View file

@ -5,7 +5,7 @@ class ChoreoResponseModel {
String? feedbackMessage;
int? payloadId;
ChoreoResponseModel(
{this.grammarData, this.detectedLang, this.route, this.feedbackMessage});
{this.grammarData, this.detectedLang, this.route, this.feedbackMessage,});
ChoreoResponseModel.fromJson(Map<String, dynamic> json) {
grammarData = json['grammar_data'] != null

View file

@ -68,7 +68,7 @@ class ChoreoRecord {
throw Exception("match and step should not both be defined");
}
choreoSteps.add(ChoreoRecordStep(
text: text, acceptedOrIgnoredMatch: match, itStep: step));
text: text, acceptedOrIgnoredMatch: match, itStep: step,),);
}
bool get hasAcceptedMatches => choreoSteps.any(
@ -118,11 +118,11 @@ class ChoreoRecord {
/// for each continuance
/// if not within the final message, save ignIT/incIT
List<OneConstructUse> toVocabUse(
List<PangeaToken> tokens, String chatId, String msgId) {
List<PangeaToken> tokens, String chatId, String msgId,) {
final List<OneConstructUse> uses = [];
final DateTime now = DateTime.now();
List<OneConstructUse> lemmasToVocabUses(
List<Lemma> lemmas, ConstructUseType type) {
List<Lemma> lemmas, ConstructUseType type,) {
final List<OneConstructUse> uses = [];
for (final lemma in lemmas) {
if (lemma.saveVocab) {
@ -134,7 +134,7 @@ class ChoreoRecord {
form: lemma.form,
msgId: msgId,
constructType: ConstructType.vocab,
));
),);
}
}
return uses;
@ -147,7 +147,7 @@ class ChoreoRecord {
if (step.acceptedOrIgnoredMatch?.status == PangeaMatchStatus.accepted &&
(step.acceptedOrIgnoredMatch!.match.choices?.any((r) =>
r.value.contains(token.text.content) &&
step.text.contains(r.value)) ??
step.text.contains(r.value),) ??
false)) {
return lemmasToVocabUses(token.lemmas, ConstructUseType.ga);
}
@ -212,7 +212,7 @@ class ChoreoRecord {
form: name,
msgId: msgId,
constructType: ConstructType.grammar,
));
),);
}
}
return uses;
@ -253,10 +253,10 @@ class ChoreoRecordStep {
ITStep? itStep;
ChoreoRecordStep(
{required this.text, this.acceptedOrIgnoredMatch, this.itStep}) {
{required this.text, this.acceptedOrIgnoredMatch, this.itStep,}) {
if (itStep != null && acceptedOrIgnoredMatch != null) {
throw Exception(
"itStep and acceptedOrIgnoredMatch should not both be defined");
"itStep and acceptedOrIgnoredMatch should not both be defined",);
}
}

View file

@ -14,11 +14,11 @@ class ClassAnalyticsModel {
}
Map<String, dynamic> toJson() {
final _data = <String, dynamic>{};
_data['class_id'] = classId;
_data['user_ids'] = userIds;
_data['analytics'] = analytics.map((e) => e.toJson()).toList();
return _data;
final data = <String, dynamic>{};
data['class_id'] = classId;
data['user_ids'] = userIds;
data['analytics'] = analytics.map((e) => e.toJson()).toList();
return data;
}
}
@ -37,10 +37,10 @@ class Analytics {
}
Map<String, dynamic> toJson() {
final _data = <String, dynamic>{};
_data['title'] = title;
_data['section'] = section.map((e) => e.toJson()).toList();
return _data;
final data = <String, dynamic>{};
data['title'] = title;
data['section'] = section.map((e) => e.toJson()).toList();
return data;
}
}
@ -61,11 +61,11 @@ class Section {
}
Map<String, dynamic> toJson() {
final _data = <String, dynamic>{};
_data['title'] = title;
_data['class_total'] = classTotal;
_data['data'] = data.map((e) => e.toJson()).toList();
return _data;
final data = <String, dynamic>{};
data['title'] = title;
data['class_total'] = classTotal;
data['data'] = data.map((e) => e.toJson()).toList();
return data;
}
}
@ -73,9 +73,6 @@ class Data {
Data();
set value(String val) => _value = val;
String get value {
if (_value == null) {
return _value.toString();
}
if (value_type == 'date') {
return DateFormat('yyyy/M/dd hh:mm a')
.format(DateTime.parse(_value).toLocal())
@ -94,10 +91,10 @@ class Data {
}
Map<String, dynamic> toJson() {
final _data = <String, dynamic>{};
_data['user_id'] = userId;
_data['value'] = _value;
_data['value_type'] = value_type;
return _data;
final data = <String, dynamic>{};
data['user_id'] = userId;
data['value'] = _value;
data['value_type'] = value_type;
return data;
}
}

View file

@ -44,9 +44,9 @@ class ClassSettingsModel {
city: json['city'],
country: json['country'],
dominantLanguage: LanguageModel.codeFromNameOrCode(
json['dominant_language'] ?? LanguageKeys.unknownLanguage),
json['dominant_language'] ?? LanguageKeys.unknownLanguage,),
targetLanguage: LanguageModel.codeFromNameOrCode(
json['target_language'] ?? LanguageKeys.unknownLanguage),
json['target_language'] ?? LanguageKeys.unknownLanguage,),
languageLevel: json['language_level'],
schoolName: json['school_name'],
);

View file

@ -29,12 +29,12 @@ class ConstructUses {
// try {
debugger(
when: kDebugMode &&
(json['uses'] == null || json[ModelKey.lemma] == null));
(json['uses'] == null || json[ModelKey.lemma] == null),);
return ConstructUses(
lemma: json[ModelKey.lemma],
uses: (json['uses'] as Iterable)
.map<OneConstructUse?>(
(use) => use != null ? OneConstructUse.fromJson(use) : null)
(use) => use != null ? OneConstructUse.fromJson(use) : null,)
.where((element) => element != null)
.cast<OneConstructUse>()
.toList(),

View file

@ -36,6 +36,6 @@ class CustomInputRequestModel {
ModelKey.tgtLang: targetLangCode,
'user_id': userId,
'room_id': roomId,
'class_id': classId
'class_id': classId,
};
}

View file

@ -22,7 +22,7 @@ class VocabHeadwords {
lists.add(VocabList(
name: entry.key,
lemmas: (entry.value as Iterable).cast<String>().toList(),
));
),);
}
return VocabHeadwords(lists: lists);
}

View file

@ -213,7 +213,7 @@ class IGCTextData {
Breadcrumb.fromJson(
{
"fullText": originalInput,
"tokens": tokens.map((e) => e.toJson()).toString()
"tokens": tokens.map((e) => e.toJson()).toString(),
},
),
);
@ -306,7 +306,7 @@ class IGCTextData {
transformTargetId: transformTargetId,
))
: null,
));
),);
final int charBetween = getAfterTokenSpacingByIndex(
index,

View file

@ -79,7 +79,7 @@ class LanguageModel {
languageFlag: "",
displayName: "Unknown",
l2: false,
l1: false);
l1: false,);
static LanguageModel multiLingual([BuildContext? context]) => LanguageModel(
displayName: context != null
@ -522,7 +522,7 @@ class _LanguageLocal {
"ce": {"name": "Chechen", "nativeName": "нохчийн мотт"},
"ny": {
"name": "Chichewa, Chewa, Nyanja",
"nativeName": "chiCheŵa, chinyanja"
"nativeName": "chiCheŵa, chinyanja",
},
"zh": {"name": "Chinese", "nativeName": "中文 (Zhōngwén), 汉语, 漢語"},
"cv": {"name": "Chuvash", "nativeName": "чӑваш чӗлхи"},
@ -544,7 +544,7 @@ class _LanguageLocal {
"fr": {"name": "French", "nativeName": "français, langue française"},
"ff": {
"name": "Fula; Fulah; Pulaar; Pular",
"nativeName": "Fulfulde, Pulaar, Pular"
"nativeName": "Fulfulde, Pulaar, Pular",
},
"gl": {"name": "Galician", "nativeName": "Galego"},
"ka": {"name": "Georgian", "nativeName": "ქართული"},
@ -563,7 +563,7 @@ class _LanguageLocal {
"id": {"name": "Indonesian", "nativeName": "Bahasa Indonesia"},
"ie": {
"name": "Interlingue",
"nativeName": "Originally called Occidental; then Interlingue after WWII"
"nativeName": "Originally called Occidental; then Interlingue after WWII",
},
"ga": {"name": "Irish", "nativeName": "Gaeilge"},
"ig": {"name": "Igbo", "nativeName": "Asụsụ Igbo"},
@ -576,7 +576,7 @@ class _LanguageLocal {
"jv": {"name": "Javanese", "nativeName": "basa Jawa"},
"kl": {
"name": "Kalaallisut, Greenlandic",
"nativeName": "kalaallisut, kalaallit oqaasii"
"nativeName": "kalaallisut, kalaallit oqaasii",
},
"kn": {"name": "Kannada", "nativeName": "ಕನ್ನಡ"},
"kr": {"name": "Kanuri", "nativeName": "Kanuri"},
@ -594,12 +594,12 @@ class _LanguageLocal {
"la": {"name": "Latin", "nativeName": "latine, lingua latina"},
"lb": {
"name": "Luxembourgish, Letzeburgesch",
"nativeName": "Lëtzebuergesch"
"nativeName": "Lëtzebuergesch",
},
"lg": {"name": "Luganda", "nativeName": "Luganda"},
"li": {
"name": "Limburgish, Limburgan, Limburger",
"nativeName": "Limburgs"
"nativeName": "Limburgs",
},
"ln": {"name": "Lingala", "nativeName": "Lingála"},
"lo": {"name": "Lao", "nativeName": "ພາສາລາວ"},
@ -631,7 +631,7 @@ class _LanguageLocal {
"cu": {
"name":
"Old Church Slavonic, Church Slavic, Church Slavonic, Old Bulgarian, Old Slavonic",
"nativeName": "ѩзыкъ словѣньскъ"
"nativeName": "ѩзыкъ словѣньскъ",
},
"om": {"name": "Oromo", "nativeName": "Afaan Oromoo"},
"or": {"name": "Oriya", "nativeName": "ଓଡ଼ିଆ"},
@ -673,7 +673,7 @@ class _LanguageLocal {
"ti": {"name": "Tigrinya", "nativeName": "ትግርኛ"},
"bo": {
"name": "Tibetan Standard, Tibetan, Central",
"nativeName": "བོད་ཡིག"
"nativeName": "བོད་ཡིག",
},
"tk": {"name": "Turkmen", "nativeName": "Türkmen, Түркмен"},
"tl": {"name": "Tagalog", "nativeName": "Wikang Tagalog, ᜏᜒᜃᜅ᜔ ᜆᜄᜎᜓᜄ᜔"},

View file

@ -161,13 +161,13 @@ class MobileSubscriptionInfo extends SubscriptionInfo {
.entitlements.all.entries
.where((MapEntry<String, EntitlementInfo> entry) =>
entry.value.expirationDate == null ||
DateTime.parse(entry.value.expirationDate!).isAfter(DateTime.now()))
DateTime.parse(entry.value.expirationDate!).isAfter(DateTime.now()),)
.map((MapEntry<String, EntitlementInfo> entry) => entry.value)
.toList();
allEntitlements = info.entitlements.all.entries
.map((MapEntry<String, EntitlementInfo> entry) =>
entry.value.productIdentifier)
entry.value.productIdentifier,)
.cast<String>()
.toList();

View file

@ -70,7 +70,7 @@ class PangeaMatch {
bool get needsTranslation => match.rule?.id != null
? [
MatchRuleIds.tokenNeedsTranslation,
MatchRuleIds.tokenSpanNeedsTranslation
MatchRuleIds.tokenSpanNeedsTranslation,
].contains(match.rule!.id)
: false;
@ -81,7 +81,7 @@ class PangeaMatch {
Map<String, dynamic> toJson() => {
_matchKey: match.toJson(),
// _detectionsKey: detections.map((e) => e.toJson()).toList(),
_statusKey: _statusEnumToString(status)
_statusKey: _statusEnumToString(status),
};
String get matchContent {
@ -99,7 +99,7 @@ class PangeaMatch {
debugger(when: kDebugMode);
ErrorHandler.logError(
m: "match.offset + match.length > match.fullText.length",
data: match.toJson());
data: match.toJson(),);
} else {
end = match.offset + match.length;
}

View file

@ -7,13 +7,13 @@ class PTextTapModel {
{required this.cursorOffset,
required this.isHighLighted,
required this.textAtOffSet,
required this.word});
required this.word,});
toJson() {
return {
'cursorOffset': cursorOffset,
'word': word,
'isHighlighted': isHighLighted,
'textAtOffSet': textAtOffSet
'textAtOffSet': textAtOffSet,
};
}
}

View file

@ -73,14 +73,14 @@ class PangeaTokenText {
int length;
PangeaTokenText(
{required this.offset, required this.content, required this.length});
{required this.offset, required this.content, required this.length,});
factory PangeaTokenText.fromJson(Map<String, dynamic> json) {
debugger(when: kDebugMode && json[_offsetKey] == null);
return PangeaTokenText(
offset: json[_offsetKey],
content: json[_contentKey],
length: json[_lengthKey] ?? (json[_contentKey] as String).length);
length: json[_lengthKey] ?? (json[_contentKey] as String).length,);
}
static const String _offsetKey = "offset";

View file

@ -111,7 +111,7 @@ class SpanChoice {
value: json['value'] as String,
type: json['type'] != null
? SpanChoiceType.values.firstWhereOrNull(
(element) => element.name == json['type']) ??
(element) => element.name == json['type'],) ??
SpanChoiceType.bestCorrection
: SpanChoiceType.bestCorrection,
feedback: json['feedback'],

View file

@ -112,7 +112,7 @@ class StudentAnalyticsEvent {
}
Future<TimeSeriesInterval> getTimeServiesInterval(
DateTime start, DateTime end, String? chatId) async {
DateTime start, DateTime end, String? chatId,) async {
final TimeSeriesInterval interval = TimeSeriesInterval(
start: start,
end: end,

View file

@ -85,7 +85,7 @@ class StudentAnalyticsSummary {
Map<String, dynamic> toJson() => {
_messagesKey: jsonEncode(_messages.map((e) => e.toJson()).toList()),
_lastUpdatedKey: lastUpdated.toIso8601String()
_lastUpdatedKey: lastUpdated.toIso8601String(),
};
factory StudentAnalyticsSummary.fromJson(json) {

View file

@ -66,9 +66,9 @@ class Profile {
factory Profile.fromJson(Map<String, dynamic> json) {
final l2 = LanguageModel.codeFromNameOrCode(
json[ModelKey.l2LanguageKey] ?? LanguageKeys.unknownLanguage);
json[ModelKey.l2LanguageKey] ?? LanguageKeys.unknownLanguage,);
final l1 = LanguageModel.codeFromNameOrCode(
json[ModelKey.l1LanguageKey] ?? LanguageKeys.unknownLanguage);
json[ModelKey.l1LanguageKey] ?? LanguageKeys.unknownLanguage,);
return Profile(
// fullName: json[ModelKey.userFullName],

View file

@ -1,5 +1,3 @@
import 'dart:convert';
import 'dart:developer';
import 'user_model.dart';

View file

@ -6,7 +6,7 @@ class WidgetMeasurements {
static WidgetMeasurements defaultFromKey(String key) {
if (_fromKey[key] == null) {
_fromKey[key] = WidgetMeasurements(
position: const Offset(0, 0), size: const Size(0, 0), uid: key);
position: const Offset(0, 0), size: const Size(0, 0), uid: key,);
}
final WidgetMeasurements? weg = _fromKey[key];
@ -17,7 +17,7 @@ class WidgetMeasurements {
Size? size;
String? uid;
WidgetMeasurements(
{required this.position, required this.size, required this.uid});
{required this.position, required this.size, required this.uid,});
toJson() => {'position': position, 'size': size, 'uid': uid};
}

View file

@ -1,4 +1,3 @@
import 'dart:convert';
import 'package:flutter/foundation.dart';
@ -20,7 +19,7 @@ class ApiException {
debugPrint(statusCode.toString());
}
PToastController.toastMsg(
msg: "Exception: Unauthorized access", success: false);
msg: "Exception: Unauthorized access", success: false,);
return;
case 403:
@ -29,7 +28,7 @@ class ApiException {
debugPrint(statusCode.toString());
}
PToastController.toastMsg(
msg: "Exception: Don't have permissions!", success: false);
msg: "Exception: Don't have permissions!", success: false,);
return;
case 500:
if (kDebugMode) {
@ -37,7 +36,7 @@ class ApiException {
debugPrint(statusCode.toString());
}
PToastController.toastMsg(
msg: "Exception: Internal Server Error", success: false);
msg: "Exception: Internal Server Error", success: false,);
return;
case 502:
if (kDebugMode) {
@ -45,7 +44,7 @@ class ApiException {
debugPrint(statusCode.toString());
}
PToastController.toastMsg(
msg: "Exception: Bad Gateway", success: false);
msg: "Exception: Bad Gateway", success: false,);
return;
case 503:
@ -54,7 +53,7 @@ class ApiException {
debugPrint(statusCode.toString());
}
PToastController.toastMsg(
msg: "Exception: Service Unavailable", success: false);
msg: "Exception: Service Unavailable", success: false,);
return;
case 504:
@ -63,7 +62,7 @@ class ApiException {
debugPrint(statusCode.toString());
}
PToastController.toastMsg(
msg: "Exception: Gateway timeout error!", success: false);
msg: "Exception: Gateway timeout error!", success: false,);
return;
default:
@ -72,7 +71,7 @@ class ApiException {
debugPrint(statusCode.toString());
}
PToastController.toastMsg(
msg: "Unknown exception accrued!", success: false);
msg: "Unknown exception accrued!", success: false,);
return;
}
}

View file

@ -15,10 +15,10 @@ class Requests {
{this.accessToken,
this.baseUrl = '',
this.matrixAccessToken,
this.choreoApiKey});
this.choreoApiKey,});
Future<http.Response> post(
{required String url, required Map<dynamic, dynamic> body}) async {
{required String url, required Map<dynamic, dynamic> body,}) async {
dynamic encoded;
encoded = jsonEncode(body);
@ -35,7 +35,7 @@ class Requests {
}
Future<http.Response> put(
{required String url, required Map<dynamic, dynamic> body}) async {
{required String url, required Map<dynamic, dynamic> body,}) async {
dynamic encoded;
encoded = jsonEncode(body);
@ -85,7 +85,7 @@ class Requests {
}
void handleError(http.Response response,
{Map<dynamic, dynamic>? body, String? objectId}) {
{Map<dynamic, dynamic>? body, String? objectId,}) {
//PTODO - handle 401 error - unauthorized call
//kick them back to login?

View file

@ -14,7 +14,7 @@ import 'list_summary_analytics.dart';
class AnalyticsListTile extends StatelessWidget {
const AnalyticsListTile({
Key? key,
super.key,
required this.model,
required this.displayName,
required this.avatar,
@ -23,7 +23,7 @@ class AnalyticsListTile extends StatelessWidget {
required this.selected,
required this.onTap,
required this.allowNavigateOnSelect,
}) : super(key: key);
});
final Uri? avatar;
final String displayName;

View file

@ -4,12 +4,12 @@ import 'package:fl_chart/fl_chart.dart';
class BarChartCard extends StatelessWidget {
const BarChartCard({
Key? key,
super.key,
required this.barChartTitle,
required this.barChart,
required this.legend,
required this.loadingData,
}) : super(key: key);
});
final String barChartTitle;
final BarChart? barChart;

View file

@ -6,7 +6,7 @@ import '../../enum/use_type.dart';
class BarChartPlaceHolderData {
static BarChartRodData randomBarChartRodData(
BuildContext context, int index) {
BuildContext context, int index,) {
// final total = Random().nextInt(100);
// final it = total != 0 ? Random().nextInt(max(total - index, 1)) : 0;
// final igc = total != 0 ? Random().nextInt(max(total - it - index, 1)) : 0;
@ -54,7 +54,7 @@ class BarChartPlaceHolderData {
14,
15,
16,
17
17,
];
final List<BarChartGroupData> barChartGroupData = [];
@ -75,7 +75,7 @@ class BarChartPlaceHolderData {
}
static List<BarChartGroupData> getData(
Color dark, Color normal, Color light) {
Color dark, Color normal, Color light,) {
const double barSpace = 16;
return [

View file

@ -27,14 +27,14 @@ class BaseAnalyticsPage extends StatefulWidget {
final AnalyticsSelected? alwaysSelected;
const BaseAnalyticsPage({
Key? key,
super.key,
required this.pageTitle,
required this.tabData1,
required this.tabData2,
required this.defaultAnalyticsSelected,
required this.refreshData,
required this.alwaysSelected,
}) : super(key: key);
});
@override
State<BaseAnalyticsPage> createState() => BaseAnalyticsController();
@ -53,7 +53,7 @@ class BaseAnalyticsController extends State<BaseAnalyticsPage> {
bool isSelected(String chatOrStudentId) => chatOrStudentId == selected?.id;
ChartAnalyticsModel? chartData(
BuildContext context, AnalyticsSelected? selectedParam) {
BuildContext context, AnalyticsSelected? selectedParam,) {
final AnalyticsSelected analyticsSelected =
selectedParam ?? widget.defaultAnalyticsSelected;
@ -124,9 +124,9 @@ class BaseAnalyticsController extends State<BaseAnalyticsPage> {
class BaseAnalyticsView extends StatelessWidget {
const BaseAnalyticsView({
Key? key,
super.key,
required this.controller,
}) : super(key: key);
});
final BaseAnalyticsController controller;
@ -163,7 +163,7 @@ class BaseAnalyticsView extends StatelessWidget {
style: TextStyle(
color: Theme.of(context).textTheme.bodyLarge!.color,
fontSize: 18,
fontWeight: FontWeight.w700),
fontWeight: FontWeight.w700,),
overflow: TextOverflow.clip,
textAlign: TextAlign.center,
),
@ -231,7 +231,7 @@ class BaseAnalyticsView extends StatelessWidget {
child: SizedBox(
height: max(
controller.widget.tabData1.items.length + 1,
controller.widget.tabData2.items.length) *
controller.widget.tabData2.items.length,) *
72,
child: TabBarView(
children: [
@ -262,7 +262,7 @@ class BaseAnalyticsView extends StatelessWidget {
.allowNavigateOnSelect,
),
)
.toList(),
,
if (controller.widget.defaultAnalyticsSelected
.type ==
AnalyticsEntryType.space)
@ -283,7 +283,7 @@ class BaseAnalyticsView extends StatelessWidget {
.widget.defaultAnalyticsSelected.id,
type: AnalyticsEntryType.privateChats,
selected: controller.isSelected(controller
.widget.defaultAnalyticsSelected.id),
.widget.defaultAnalyticsSelected.id,),
onTap: controller.toggleSelection,
allowNavigateOnSelect: false,
),
@ -314,7 +314,7 @@ class BaseAnalyticsView extends StatelessWidget {
),
)
.toList(),
)
),
],
),
),
@ -323,7 +323,7 @@ class BaseAnalyticsView extends StatelessWidget {
],
),
),
)
),
],
),
),
@ -341,7 +341,7 @@ class TabData {
{required this.type,
required this.items,
required this.icon,
this.allowNavigateOnSelect = true});
this.allowNavigateOnSelect = true,});
}
class TabItem {

View file

@ -8,8 +8,7 @@ class ChartViewPickerButton extends StatelessWidget {
final BarChartViewSelection selected;
final void Function(BarChartViewSelection) onChange;
const ChartViewPickerButton(
{Key? key, required this.selected, required this.onChange})
: super(key: key);
{super.key, required this.selected, required this.onChange,});
@override
Widget build(BuildContext context) {

View file

@ -22,7 +22,7 @@ enum AnalyticsPageType { classList, student, classDetails }
class ClassAnalyticsPage extends StatefulWidget {
// final AnalyticsPageType type;
const ClassAnalyticsPage({Key? key}) : super(key: key);
const ClassAnalyticsPage({super.key});
@override
State<ClassAnalyticsPage> createState() => ClassAnalyticsV2Controller();

View file

@ -8,7 +8,7 @@ import 'class_analytics.dart';
class ClassAnalyticsView extends StatelessWidget {
final ClassAnalyticsV2Controller controller;
const ClassAnalyticsView(this.controller, {Key? key}) : super(key: key);
const ClassAnalyticsView(this.controller, {super.key});
@override
Widget build(BuildContext context) {
@ -37,7 +37,7 @@ class ClassAnalyticsView extends StatelessWidget {
avatar: s.avatarUrl,
displayName: s.displayName ?? "unknown",
id: s.id,
))
),)
.toList(),
);

View file

@ -14,7 +14,7 @@ import '../../../utils/sync_status_util_v2.dart';
import '../../../widgets/common/list_placeholder.dart';
class AnalyticsClassList extends StatefulWidget {
const AnalyticsClassList({Key? key}) : super(key: key);
const AnalyticsClassList({super.key});
@override
State<AnalyticsClassList> createState() => AnalyticsClassListController();
@ -32,7 +32,7 @@ class AnalyticsClassListController extends State<AnalyticsClassList> {
Future.delayed(Duration.zero, () async {
stateSub = pangeaController.matrixState.client.onRoomState.stream
.where(
(event) => event.type == PangeaEventTypes.studentAnalyticsSummary)
(event) => event.type == PangeaEventTypes.studentAnalyticsSummary,)
.listen(onStateUpdate);
});
}

View file

@ -14,7 +14,7 @@ import 'class_list.dart';
class AnalyticsClassListView extends StatelessWidget {
final AnalyticsClassListController controller;
const AnalyticsClassListView(this.controller, {Key? key}) : super(key: key);
const AnalyticsClassListView(this.controller, {super.key});
@override
Widget build(BuildContext context) {

View file

@ -12,10 +12,10 @@ class ConstructCloud extends StatefulWidget {
final AnalyticsSelected defaultSelected;
const ConstructCloud({
Key? key,
super.key,
required this.selected,
required this.defaultSelected,
}) : super(key: key);
});
@override
State<StatefulWidget> createState() => ConstructCloudState();
@ -28,7 +28,7 @@ class ConstructCloudState extends State<ConstructCloud> {
{"word": "loading", 'value': 1},
{"word": "loading", 'value': 1},
{"word": "loading", 'value': 1},
{"word": "loading", 'value': 1}
{"word": "loading", 'value': 1},
];
@override
@ -77,7 +77,7 @@ class ConstructCloudState extends State<ConstructCloud> {
colorlist: const [
Colors.black,
Colors.redAccent,
Colors.indigoAccent
Colors.indigoAccent,
],
),
const SizedBox(
@ -93,7 +93,7 @@ class ConstructCloudState extends State<ConstructCloud> {
colorlist: const [
Colors.black,
Colors.redAccent,
Colors.indigoAccent
Colors.indigoAccent,
],
),
],

View file

@ -20,12 +20,12 @@ class ConstructList extends StatefulWidget {
final String title;
const ConstructList({
Key? key,
super.key,
required this.selected,
required this.defaultSelected,
required this.constructType,
required this.title,
}) : super(key: key);
});
@override
State<StatefulWidget> createState() => ConstructListState();
@ -147,10 +147,10 @@ class ConstructListView extends StatelessWidget {
final bool init;
const ConstructListView({
Key? key,
super.key,
required this.constructs,
required this.init,
}) : super(key: key);
});
@override
Widget build(BuildContext context) {

View file

@ -10,7 +10,7 @@ import '../../enum/use_type.dart';
class ListSummaryAnalytics extends StatelessWidget {
final ChartAnalyticsModel? chartAnalytics;
const ListSummaryAnalytics({Key? key, this.chartAnalytics}) : super(key: key);
const ListSummaryAnalytics({super.key, this.chartAnalytics});
TimeSeriesTotals? get totals => chartAnalytics?.totals;
@ -63,7 +63,7 @@ class ListSummaryAnalytics extends StatelessWidget {
Icons.chat_bubble,
totals!.all,
Theme.of(context).textTheme.bodyLarge!.color,
false),
false,),
if (totals!.all != 0) ...[
spacerIconText(
l10n != null ? l10n.taTooltip : "With translation assistance",
@ -93,7 +93,7 @@ class ListSummaryAnalytics extends StatelessWidget {
totals!.unPercent,
UseType.un.color(context),
),
]
],
],
),
);

View file

@ -19,8 +19,7 @@ class MessagesBarChart extends StatefulWidget {
final String barChartTitle;
const MessagesBarChart(
{Key? key, required this.chartAnalytics, required this.barChartTitle})
: super(key: key);
{super.key, required this.chartAnalytics, required this.barChartTitle,});
@override
State<StatefulWidget> createState() => MessagesBarChartState();
@ -182,7 +181,7 @@ class MessagesBarChartState extends State<MessagesBarChart> {
}
bool isInSameGroup(
TimeSeriesInterval? t1, TimeSeriesInterval t2, TimeSpan timeSpan) {
TimeSeriesInterval? t1, TimeSeriesInterval t2, TimeSpan timeSpan,) {
final DateTime? date1 = t1?.end;
final DateTime date2 = t2.end;
if (timeSpan == TimeSpan.sixmonths || timeSpan == TimeSpan.year) {
@ -236,7 +235,7 @@ class MessagesBarChartState extends State<MessagesBarChart> {
barsSpace: barSpace,
// barRods: intervalGroup.map(constructBarChartRodData).toList(),
barRods: constructBarChartRodData(intervalGroup),
));
),);
});
return chartData;
}
@ -259,7 +258,7 @@ class MessagesBarChartState extends State<MessagesBarChart> {
// }
List<BarChartRodData> constructBarChartRodData(
List<TimeSeriesInterval> timeSeriesIntervalGroup) {
List<TimeSeriesInterval> timeSeriesIntervalGroup,) {
int y1 = 0;
int y2 = 0;
int y3 = 0;
@ -277,14 +276,14 @@ class MessagesBarChartState extends State<MessagesBarChart> {
rodStackItems: [
BarChartRodStackItem(0, y1.toDouble(), UseType.ta.color(context)),
BarChartRodStackItem(
y1.toDouble(), y2.toDouble(), UseType.ga.color(context)),
y1.toDouble(), y2.toDouble(), UseType.ga.color(context),),
BarChartRodStackItem(
y2.toDouble(), y3.toDouble(), UseType.wa.color(context)),
y2.toDouble(), y3.toDouble(), UseType.wa.color(context),),
BarChartRodStackItem(
y3.toDouble(), y4.toDouble(), UseType.un.color(context)),
y3.toDouble(), y4.toDouble(), UseType.un.color(context),),
],
borderRadius: BorderRadius.zero,
)
),
];
}

View file

@ -4,8 +4,8 @@ import 'package:fluffychat/pangea/enum/use_type.dart';
class MessagesLegendsListWidget extends StatelessWidget {
const MessagesLegendsListWidget({
Key? key,
}) : super(key: key);
super.key,
});
@override
Widget build(BuildContext context) {
@ -26,7 +26,7 @@ class MessagesLegendsListWidget extends StatelessWidget {
),
),
const SizedBox(width: 4),
e.iconView(context, e.color(context), 20)
e.iconView(context, e.color(context), 20),
],
),
)

View file

@ -16,7 +16,7 @@ import '../base_analytics_page.dart';
import 'student_analytics_view.dart';
class StudentAnalyticsPage extends StatefulWidget {
const StudentAnalyticsPage({Key? key}) : super(key: key);
const StudentAnalyticsPage({super.key});
@override
State<StudentAnalyticsPage> createState() => StudentAnalyticsController();
@ -31,7 +31,7 @@ class StudentAnalyticsController extends State<StudentAnalyticsPage> {
void initState() {
_pangeaController.matrixState.client
.updateMyLearningAnalyticsForAllClassesImIn(
_pangeaController.pStoreService);
_pangeaController.pStoreService,);
super.initState();
}

View file

@ -9,7 +9,7 @@ import 'student_analytics.dart';
class StudentAnalyticsView extends StatelessWidget {
final StudentAnalyticsController controller;
const StudentAnalyticsView(this.controller, {Key? key}) : super(key: key);
const StudentAnalyticsView(this.controller, {super.key});
@override
Widget build(BuildContext context) {
@ -26,7 +26,7 @@ class StudentAnalyticsView extends StatelessWidget {
displayName:
c.getLocalizedDisplayname(MatrixLocals(L10n.of(context)!)),
id: c.id,
))
),)
.toList(),
allowNavigateOnSelect: false,
);
@ -39,9 +39,9 @@ class StudentAnalyticsView extends StatelessWidget {
displayName: c
.getLocalizedDisplayname(MatrixLocals(L10n.of(context)!)),
id: c.id,
))
),)
.toList(),
allowNavigateOnSelect: false);
allowNavigateOnSelect: false,);
return controller.userId != null
? BaseAnalyticsPage(
@ -51,12 +51,12 @@ class StudentAnalyticsView extends StatelessWidget {
defaultAnalyticsSelected: AnalyticsSelected(
controller.userId!,
AnalyticsEntryType.student,
L10n.of(context)!.allChatsAndClasses),
L10n.of(context)!.allChatsAndClasses,),
refreshData: controller.getClassAndChatAnalytics,
alwaysSelected: AnalyticsSelected(
controller.userId!,
AnalyticsEntryType.student,
L10n.of(context)!.allChatsAndClasses),
L10n.of(context)!.allChatsAndClasses,),
)
: const SizedBox();
}

View file

@ -8,8 +8,7 @@ class TimeSpanMenuButton extends StatelessWidget {
final TimeSpan value;
final void Function(TimeSpan) onChange;
const TimeSpanMenuButton(
{Key? key, required this.value, required this.onChange})
: super(key: key);
{super.key, required this.value, required this.onChange,});
@override
Widget build(BuildContext context) {

View file

@ -14,10 +14,10 @@ class VocabBarChart extends StatefulWidget {
final AnalyticsSelected defaultSelected;
const VocabBarChart({
Key? key,
super.key,
required this.selected,
required this.defaultSelected,
}) : super(key: key);
});
@override
State<StatefulWidget> createState() => VocabBarChartState();
@ -145,7 +145,7 @@ class VocabBarChartState extends State<VocabBarChart> {
barsSpace: barSpace,
// barRods: intervalGroup.map(constructBarChartRodData).toList(),
barRods: constructBarChartRodData(intervalGroup),
));
),);
});
return chartData;
}
@ -166,7 +166,7 @@ class VocabBarChartState extends State<VocabBarChart> {
BarChartRodStackItem(y2.toDouble(), y3.toDouble(), Colors.green),
],
borderRadius: BorderRadius.zero,
)
),
];
}
}

View file

@ -4,8 +4,8 @@ import 'package:fluffychat/pangea/enum/use_type.dart';
class VocabLegendsListWidget extends StatelessWidget {
const VocabLegendsListWidget({
Key? key,
}) : super(key: key);
super.key,
});
@override
Widget build(BuildContext context) {
@ -26,7 +26,7 @@ class VocabLegendsListWidget extends StatelessWidget {
),
),
const SizedBox(width: 4),
e.iconView(context, e.color(context), 20)
e.iconView(context, e.color(context), 20),
],
),
)

View file

@ -7,8 +7,7 @@ class MeasurableWidget extends StatefulWidget {
Function? triggerMeasure;
final Function(Size? size, Offset? position) onChange;
MeasurableWidget({Key? key, required this.onChange, required this.child})
: super(key: key);
MeasurableWidget({super.key, required this.onChange, required this.child});
@override
_WidgetSizeState createState() => _WidgetSizeState();

View file

@ -12,7 +12,7 @@ import 'package:matrix/matrix.dart';
import 'package:fluffychat/widgets/matrix.dart';
class ClassInvitationSelection extends StatefulWidget {
const ClassInvitationSelection({Key? key}) : super(key: key);
const ClassInvitationSelection({super.key});
@override
ClassInvitationSelectionController createState() =>

View file

@ -10,10 +10,10 @@ class ClassNameHeader extends StatelessWidget {
final Room room;
final ChatDetailsController controller;
const ClassNameHeader({
Key? key,
super.key,
required this.room,
required this.controller,
}) : super(key: key);
});
@override
Widget build(BuildContext context) {
@ -34,7 +34,7 @@ class ClassNameHeader extends StatelessWidget {
icon: room.nameAndRoomTypeIcon(TextStyle(
fontSize: 20,
color: Theme.of(context).textTheme.bodyLarge!.color,
)),
),),
// icon: Text(
// room.getLocalizedDisplayname(
// MatrixLocals(L10n.of(context)!),

View file

@ -18,7 +18,7 @@ import 'class_settings_view.dart';
import 'p_class_widgets/room_rules_editor.dart';
class ClassSettingsPage extends StatefulWidget {
const ClassSettingsPage({Key? key}) : super(key: key);
const ClassSettingsPage({super.key});
@override
State<ClassSettingsPage> createState() => ClassSettingsController();

View file

@ -11,8 +11,7 @@ import '../../../widgets/layouts/max_width_body.dart';
class ClassSettingsPageView extends StatelessWidget {
final ClassSettingsController controller;
const ClassSettingsPageView({Key? key, required this.controller})
: super(key: key);
const ClassSettingsPageView({super.key, required this.controller});
@override
Widget build(BuildContext context) {

View file

@ -4,7 +4,7 @@ import 'package:flutter_gen/gen_l10n/l10n.dart';
import 'package:go_router/go_router.dart';
class ClassAnalyticsButton extends StatelessWidget {
const ClassAnalyticsButton({Key? key}) : super(key: key);
const ClassAnalyticsButton({super.key});
@override
Widget build(BuildContext context) {

View file

@ -9,10 +9,10 @@ class ClassDescriptionButton extends StatelessWidget {
final Room room;
final ChatDetailsController controller;
const ClassDescriptionButton({
Key? key,
super.key,
required this.room,
required this.controller,
}) : super(key: key);
});
@override
Widget build(BuildContext context) {

View file

@ -6,9 +6,9 @@ import '../../../../pages/chat_details/chat_details.dart';
class SpaceDetailsToggleAddStudentsTile extends StatelessWidget {
const SpaceDetailsToggleAddStudentsTile({
Key? key,
super.key,
required this.controller,
}) : super(key: key);
});
final ChatDetailsController controller;
@ -31,7 +31,7 @@ class SpaceDetailsToggleAddStudentsTile extends StatelessWidget {
),
trailing: Icon(controller.displayAddStudentOptions
? Icons.keyboard_arrow_down_outlined
: Icons.keyboard_arrow_right_outlined),
: Icons.keyboard_arrow_right_outlined,),
onTap: controller.toggleAddStudentOptions,
);
}

View file

@ -16,8 +16,7 @@ import '../../../../widgets/avatar.dart';
class ClassInvitationButtons extends StatelessWidget {
final String roomId;
const ClassInvitationButtons({Key? key, required this.roomId})
: super(key: key);
const ClassInvitationButtons({super.key, required this.roomId});
@override
Widget build(BuildContext context) {

View file

@ -10,10 +10,10 @@ class ClassNameButton extends StatelessWidget {
final Room room;
final ChatDetailsController controller;
const ClassNameButton({
Key? key,
super.key,
required this.room,
required this.controller,
}) : super(key: key);
});
@override
Widget build(BuildContext context) {

View file

@ -4,7 +4,7 @@ import 'package:flutter_gen/gen_l10n/l10n.dart';
import 'package:go_router/go_router.dart';
class ClassSettingsButton extends StatelessWidget {
const ClassSettingsButton({Key? key}) : super(key: key);
const ClassSettingsButton({super.key});
// final PangeaController _pangeaController = MatrixState.pangeaController;

View file

@ -18,7 +18,7 @@ void showEditFieldDialog(BuildContext context, String title) async {
// initialText: room.topic,
minLines: 1,
maxLines: 4,
)
),
],
);
if (input == null) return;
@ -29,6 +29,6 @@ void showEditFieldDialog(BuildContext context, String title) async {
);
if (success.error == null) {
ScaffoldMessenger.of(context).showSnackBar(SnackBar(
content: Text(L10n.of(context)!.groupDescriptionHasBeenChanged)));
content: Text(L10n.of(context)!.groupDescriptionHasBeenChanged),),);
}
}

View file

@ -16,8 +16,7 @@ class RoomRulesEditor extends StatefulWidget {
final bool showAdd;
const RoomRulesEditor(
{Key? key, this.roomId, this.startOpen = true, this.showAdd = false})
: super(key: key);
{super.key, this.roomId, this.startOpen = true, this.showAdd = false,});
@override
RoomRulesState createState() => RoomRulesState();
@ -158,14 +157,14 @@ class RoomRulesState extends State<RoomRulesEditor> {
onChanged: (value) {
updatePermission(() {
rules.setLanguageToolSetting(
setting, value.toInt());
setting, value.toInt(),);
});
},
divisions: 2,
max: 2,
min: 0,
label: rules.languageToolPermissionsText(
context, setting),
context, setting,),
),
),
],

View file

@ -19,10 +19,10 @@ class PangeaSsoButton extends StatelessWidget {
final IdentityProvider identityProvider;
final void Function()? onPressed;
const PangeaSsoButton({
Key? key,
super.key,
required this.identityProvider,
this.onPressed,
}) : super(key: key);
});
ButtonInfo getButtonInfo(BuildContext context) {
switch (identityProvider.id) {

View file

@ -8,7 +8,7 @@ import 'package:fluffychat/pangea/widgets/class/add_space_toggles.dart';
import 'package:fluffychat/widgets/matrix.dart';
class AddExchangeToClass extends StatefulWidget {
const AddExchangeToClass({Key? key}) : super(key: key);
const AddExchangeToClass({super.key});
@override
AddExchangeToClassState createState() => AddExchangeToClassState();

View file

@ -11,7 +11,7 @@ import '../../repo/user_repo.dart';
import 'find_partner_view.dart';
class FindPartner extends StatefulWidget {
const FindPartner({Key? key}) : super(key: key);
const FindPartner({super.key});
@override
State<FindPartner> createState() => FindPartnerController();

View file

@ -17,7 +17,7 @@ import 'find_partner.dart';
class FindPartnerView extends StatelessWidget {
final FindPartnerController controller;
const FindPartnerView(this.controller, {Key? key}) : super(key: key);
const FindPartnerView(this.controller, {super.key});
@override
Widget build(BuildContext context) {
@ -124,9 +124,9 @@ class FindPartnerView extends StatelessWidget {
class ExpandedContainer extends StatelessWidget {
const ExpandedContainer({
Key? key,
super.key,
required this.body,
}) : super(key: key);
});
final Widget body;
@ -143,9 +143,9 @@ class ExpandedContainer extends StatelessWidget {
class ProfileSearchTextField extends StatelessWidget {
const ProfileSearchTextField({
Key? key,
super.key,
required this.controller,
}) : super(key: key);
});
final FindPartnerController controller;
@ -172,8 +172,8 @@ class ProfileSearchTextField extends StatelessWidget {
class PageTitleText extends StatelessWidget {
const PageTitleText({
Key? key,
}) : super(key: key);
super.key,
});
@override
Widget build(BuildContext context) {
@ -194,10 +194,10 @@ class PageTitleText extends StatelessWidget {
class LanguageSelectionRow extends StatelessWidget {
const LanguageSelectionRow({
Key? key,
super.key,
required this.controller,
required this.isSource,
}) : super(key: key);
});
final FindPartnerController controller;
final bool isSource;
@ -245,10 +245,10 @@ class UserProfileEntry extends StatelessWidget {
final FindPartnerController controller;
const UserProfileEntry({
Key? key,
super.key,
required this.pangeaProfile,
required this.controller,
}) : super(key: key);
});
@override
Widget build(BuildContext context) {

View file

@ -18,7 +18,7 @@ import '../../widgets/space/class_settings.dart';
import '../class_settings/p_class_widgets/room_rules_editor.dart';
class NewClass extends StatefulWidget {
const NewClass({Key? key}) : super(key: key);
const NewClass({super.key});
@override
NewClassController createState() => NewClassController();

View file

@ -15,7 +15,7 @@ class NewSpaceView extends StatelessWidget {
final NewClassController controller;
// Pangea#
const NewSpaceView(this.controller, {Key? key}) : super(key: key);
const NewSpaceView(this.controller, {super.key});
@override
Widget build(BuildContext context) {

View file

@ -16,7 +16,7 @@ import '../../utils/bot_name.dart';
import '../../utils/error_handler.dart';
class PUserAge extends StatefulWidget {
const PUserAge({Key? key}) : super(key: key);
const PUserAge({super.key});
@override
PUserAgeController createState() => PUserAgeController();

View file

@ -8,7 +8,7 @@ import '../../../widgets/layouts/login_scaffold.dart';
class PUserAgeView extends StatelessWidget {
final PUserAgeController controller;
const PUserAgeView(this.controller, {Key? key}) : super(key: key);
const PUserAgeView(this.controller, {super.key});
@override
Widget build(BuildContext context) {

View file

@ -7,7 +7,7 @@ import 'package:fluffychat/pangea/pages/settings_learning/settings_learning_view
import 'package:fluffychat/widgets/matrix.dart';
class SettingsLearning extends StatefulWidget {
const SettingsLearning({Key? key}) : super(key: key);
const SettingsLearning({super.key});
@override
SettingsLearningController createState() => SettingsLearningController();

View file

@ -14,7 +14,7 @@ import '../../../config/app_config.dart';
class SettingsLearningView extends StatelessWidget {
final SettingsLearningController controller;
const SettingsLearningView(this.controller, {Key? key}) : super(key: key);
const SettingsLearningView(this.controller, {super.key});
@override
Widget build(BuildContext context) {

View file

@ -13,7 +13,7 @@ import 'package:fluffychat/pangea/utils/subscription_app_id.dart';
import 'package:fluffychat/widgets/matrix.dart';
class SubscriptionManagement extends StatefulWidget {
const SubscriptionManagement({Key? key}) : super(key: key);
const SubscriptionManagement({super.key});
@override
SubscriptionManagementController createState() =>

View file

@ -13,7 +13,7 @@ import 'package:fluffychat/widgets/matrix.dart';
class SettingsSubscriptionView extends StatelessWidget {
final SubscriptionManagementController controller;
final PangeaController pangeaController = MatrixState.pangeaController;
SettingsSubscriptionView(this.controller, {Key? key}) : super(key: key);
SettingsSubscriptionView(this.controller, {super.key});
@override
Widget build(BuildContext context) {
@ -84,7 +84,7 @@ class SettingsSubscriptionView extends StatelessWidget {
controller: controller,
subscriptionController:
pangeaController.subscriptionController,
)
),
],
),
),
@ -100,8 +100,8 @@ class ManagementNotAvailableWarning extends StatelessWidget {
const ManagementNotAvailableWarning({
required this.controller,
required this.subscriptionController,
Key? key,
}) : super(key: key);
super.key,
});
@override
Widget build(BuildContext context) {

View file

@ -10,7 +10,7 @@ import 'package:fluffychat/utils/platform_infos.dart';
import 'package:fluffychat/widgets/matrix.dart';
class SignupPage extends StatefulWidget {
const SignupPage({Key? key}) : super(key: key);
const SignupPage({super.key});
@override
SignupPageController createState() => SignupPageController();

View file

@ -16,7 +16,7 @@ class PClassAnalyticsRepo {
String accessToken, String timeSpan,
{List<String>? classIds,
List<String>? userIds,
List<String>? chatIds}) async {
List<String>? chatIds,}) async {
// if (!AnalyticsUtil.isValidSpan(timeSpan)) throw "Invalid span";
// final Requests req = Requests(

View file

@ -31,7 +31,7 @@ class PClassRepo {
//Question for Lala: In this widget, controller, repo framework, where are
// errors handled? How are they passed?
static Future<ClassSettingsModel?> getClassByCode(
String classCode, String accessToken) async {
String classCode, String accessToken,) async {
final Requests req =
Requests(baseUrl: PApiUrls.baseAPI, accessToken: accessToken);
final Response res =
@ -50,7 +50,7 @@ class PClassRepo {
static searchClass(String text) async {}
static sendEmailToJoinClass(List<ClassEmailInviteData> data, String roomId,
String teacherName) async {}
String teacherName,) async {}
static inviteAction(BuildContext context, String id, String roomId) async {}

View file

@ -96,7 +96,7 @@ class ContextTranslationResponseModel {
Sentry.addBreadcrumb(
Breadcrumb(
message: "ContextTranslationResponseModel with empty translations",
data: {"response": json}),
data: {"response": json},),
);
}

View file

@ -8,7 +8,7 @@ class PExchangeRepo {
String requestToClass,
String requestTeacher,
String requestToClassAuthor,
String exchangePangeaId) async {}
String exchangePangeaId,) async {}
static exchangeRejectRequest(String roomId, String teacherName) async {}
@ -26,5 +26,5 @@ class PExchangeRepo {
}) async {}
static isExchange(
BuildContext context, String accessToken, String exchangeId) async {}
BuildContext context, String accessToken, String exchangeId,) async {}
}

View file

@ -55,7 +55,7 @@ class FullTextTranslationRequestModel {
ModelKey.tgtLang: tgtLang,
ModelKey.userL2: userL2,
ModelKey.userL1: userL1,
ModelKey.deepL: deepL
ModelKey.deepL: deepL,
};
}

View file

@ -15,7 +15,7 @@ import '../network/urls.dart';
class IgcRepo {
static Future<IGCTextData> getIGC(String? accessToken,
{required IGCRequestBody igcRequest}) async {
{required IGCRequestBody igcRequest,}) async {
final Requests req = Requests(
accessToken: accessToken,
choreoApiKey: Environment.choreoApiKey,
@ -52,19 +52,19 @@ class IgcRepo {
PangeaToken(
text: PangeaTokenText(content: "a", offset: 8, length: 1),
hasInfo: false,
lemmas: []),
lemmas: [],),
PangeaToken(
text: PangeaTokenText(content: "sample", offset: 10, length: 6),
hasInfo: false,
lemmas: []),
lemmas: [],),
PangeaToken(
text: PangeaTokenText(content: "text", offset: 17, length: 4),
hasInfo: false,
lemmas: []),
lemmas: [],),
],
matches: [
PangeaMatch(
match: spanDataRepomockSpan, status: PangeaMatchStatus.open),
match: spanDataRepomockSpan, status: PangeaMatchStatus.open,),
],
originalInput: "This be a sample text",
fullTextCorrection: "This is a sample text",

Some files were not shown because too many files have changed in this diff Show more