Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 62 additions & 0 deletions lib/generated/intl/messages_all.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
// DO NOT EDIT. This is code generated via package:intl/generate_localized.dart
// This is a library that looks up messages for specific locales by
// delegating to the appropriate library.

// Ignore issues from commonly used lints in this file.
// ignore_for_file:implementation_imports, file_names, unnecessary_new
// ignore_for_file:unnecessary_brace_in_string_interps, directives_ordering
// ignore_for_file:argument_type_not_assignable, invalid_assignment
// ignore_for_file:prefer_single_quotes, prefer_generic_function_type_aliases
// ignore_for_file:comment_references

import 'dart:async';

import 'package:intl/intl.dart';
import 'package:intl/message_lookup_by_library.dart';
import 'package:intl/src/intl_helpers.dart';

import 'messages_en.dart' as messages_en;

typedef Future<dynamic> LibraryLoader();
Map<String, LibraryLoader> _deferredLibraries = {
'en': () => new Future.value(null),
};

MessageLookupByLibrary? _findExact(String localeName) {
switch (localeName) {
case 'en':
return messages_en.messages;
default:
return null;
}
}

/// User programs should call this before using [localeName] for messages.
Future<bool> initializeMessages(String localeName) async {
var availableLocale = Intl.verifiedLocale(
localeName, (locale) => _deferredLibraries[locale] != null,
onFailure: (_) => null);
if (availableLocale == null) {
return new Future.value(false);
}
var lib = _deferredLibraries[availableLocale];
await (lib == null ? new Future.value(false) : lib());
initializeInternalMessageLookup(() => new CompositeMessageLookup());
messageLookup.addLocale(availableLocale, _findGeneratedMessagesFor);
return new Future.value(true);
}

bool _messagesExistFor(String locale) {
try {
return _findExact(locale) != null;
} catch (e) {
return false;
}
}

MessageLookupByLibrary? _findGeneratedMessagesFor(String locale) {
var actualLocale =
Intl.verifiedLocale(locale, _messagesExistFor, onFailure: (_) => null);
if (actualLocale == null) return null;
return _findExact(actualLocale);
}
24 changes: 24 additions & 0 deletions lib/generated/intl/messages_en.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
// DO NOT EDIT. This is code generated via package:intl/generate_localized.dart
// This is a library that provides messages for a en locale. All the
// messages from the main program should be duplicated here with the same
// function name.

// Ignore issues from commonly used lints in this file.
// ignore_for_file:unnecessary_brace_in_string_interps, unnecessary_new
// ignore_for_file:prefer_single_quotes,comment_references, directives_ordering
// ignore_for_file:annotate_overrides,prefer_generic_function_type_aliases
// ignore_for_file:unused_import, file_names

import 'package:intl/intl.dart';
import 'package:intl/message_lookup_by_library.dart';

final messages = new MessageLookup();

typedef String MessageIfAbsent(String messageStr, List<dynamic> args);

class MessageLookup extends MessageLookupByLibrary {
String get localeName => 'en';

final messages = _notInlinedMessages(_notInlinedMessages);
static _notInlinedMessages(_) => <String, Function>{};
}
78 changes: 78 additions & 0 deletions lib/generated/l10n.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions lib/l10n/intl_en.arb
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
2 changes: 2 additions & 0 deletions packages/uni_app/lib/generated/intl/messages_en.dart
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ class MessageLookup extends MessageLookupByLibrary {
"Favorite buses will be displayed in the favorites \'Bus\' widget. The remaining ones will only be displayed on the page.",
),
"calendar": MessageLookupByLibrary.simpleMessage("Calendar"),
"calendar_view": MessageLookupByLibrary.simpleMessage("Calendar"),
"cancel": MessageLookupByLibrary.simpleMessage("Cancel"),
"change": MessageLookupByLibrary.simpleMessage("Change"),
"change_password": MessageLookupByLibrary.simpleMessage("Change password"),
Expand Down Expand Up @@ -266,6 +267,7 @@ class MessageLookup extends MessageLookupByLibrary {
"library_occupation": MessageLookupByLibrary.simpleMessage(
"Library Occupation",
),
"list_view": MessageLookupByLibrary.simpleMessage("List"),
"load_error": MessageLookupByLibrary.simpleMessage(
"Error loading the information",
),
Expand Down
2 changes: 2 additions & 0 deletions packages/uni_app/lib/generated/intl/messages_pt_PT.dart
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ class MessageLookup extends MessageLookupByLibrary {
"Os autocarros favoritos serão apresentados no widget \'Autocarros\' dos favoritos. Os restantes serão apresentados apenas na página.",
),
"calendar": MessageLookupByLibrary.simpleMessage("Calendário"),
"calendar_view": MessageLookupByLibrary.simpleMessage("Calendário"),
"cancel": MessageLookupByLibrary.simpleMessage("Cancelar"),
"change": MessageLookupByLibrary.simpleMessage("Alterar"),
"change_password": MessageLookupByLibrary.simpleMessage(
Expand Down Expand Up @@ -278,6 +279,7 @@ class MessageLookup extends MessageLookupByLibrary {
"library_occupation": MessageLookupByLibrary.simpleMessage(
"Ocupação da Biblioteca",
),
"list_view": MessageLookupByLibrary.simpleMessage("Lista"),
"load_error": MessageLookupByLibrary.simpleMessage(
"Erro ao carregar a informação",
),
Expand Down
10 changes: 10 additions & 0 deletions packages/uni_app/lib/generated/l10n.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions packages/uni_app/lib/l10n/intl_en.arb
Original file line number Diff line number Diff line change
Expand Up @@ -466,6 +466,10 @@
"@services": {},
"goi": "Orientation and Integration Office",
"@goi": {},
"list_view": "List",
"@list_view": {},
"calendar_view": "Calendar",
"@calendar_view": {},
"no_course_unit_classes": "No classes have been assigned to this course unit yet",
"@no_course_unit_classes": {},
"no_course_unit_info": "This course unit has no information available yet",
Expand Down
4 changes: 4 additions & 0 deletions packages/uni_app/lib/l10n/intl_pt_PT.arb
Original file line number Diff line number Diff line change
Expand Up @@ -466,6 +466,10 @@
"@services": {},
"goi": "Gabinete de Orientação e Integração",
"@goi": {},
"list_view": "Lista",
"@list_view": {},
"calendar_view": "Calendário",
"@calendar_view": {},
"no_course_unit_classes": "Não foram atribuídas turmas a esta unidade curricular",
"@no_course_unit_classes": {},
"no_course_unit_info": "Esta unidade curricular ainda não tem informação disponível",
Expand Down
18 changes: 16 additions & 2 deletions packages/uni_app/lib/main.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import 'dart:async';

import 'package:calendar_view/calendar_view.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
Expand Down Expand Up @@ -166,8 +167,21 @@ class ApplicationState extends ConsumerState<Application> {
child: MaterialApp(
title: 'uni',
navigatorKey: Application.navigatorKey,
theme: lightTheme,
darkTheme: darkTheme,
theme: lightTheme.copyWith(
extensions: [
WeekViewThemeData.light().copyWith(
borderColor: Colors.transparent,
weekDayTextColor: lightTheme.colorScheme.onSecondary,
),
],
),
darkTheme: darkTheme.copyWith(
extensions: [
WeekViewThemeData.dark().copyWith(
borderColor: Colors.transparent,
),
],
),
themeMode: themeMode,
locale: locale.localeCode,
localizationsDelegates: const [
Expand Down
Loading
Loading