forked from firka/student-legacy
commit
485e85ddaa
@ -1,3 +1,7 @@
|
||||
#!/bin/sh
|
||||
|
||||
flutter clean
|
||||
dart pub get
|
||||
flutter doctor -v
|
||||
|
||||
flutter build ipa --release --dart-define=APPVER=$(cat pubspec.yaml | grep version: | cut -d' ' -f2 | cut -d+ -f1) --no-tree-shake-icons
|
||||
|
@ -2,6 +2,8 @@
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>aps-environment</key>
|
||||
<string>development</string>
|
||||
<key>com.apple.security.application-groups</key>
|
||||
<array>
|
||||
<string>group.refilcnaplo.livecard</string>
|
||||
|
@ -57,15 +57,13 @@ Future loginApi({
|
||||
String nonceStr = await Provider.of<KretaClient>(context, listen: false)
|
||||
.getAPI(KretaAPI.nonce, json: false);
|
||||
|
||||
Nonce nonce =
|
||||
getNonce(nonceStr, '${username.replaceAll(' ', '')} ', instituteCode);
|
||||
headers.addAll(nonce.header());
|
||||
Nonce nonce = getNonce(nonceStr, username, instituteCode);
|
||||
|
||||
Map? res = await Provider.of<KretaClient>(context, listen: false)
|
||||
.postAPI(KretaAPI.login,
|
||||
headers: headers,
|
||||
body: User.loginBody(
|
||||
username: '${username.replaceAll(' ', '')} ',
|
||||
username: username,
|
||||
password: password,
|
||||
instituteCode: instituteCode,
|
||||
));
|
||||
@ -84,7 +82,7 @@ Future loginApi({
|
||||
.getAPI(KretaAPI.student(instituteCode));
|
||||
Student student = Student.fromJson(studentJson!);
|
||||
var user = User(
|
||||
username: '${username.replaceAll(' ', '')} ',
|
||||
username: username,
|
||||
password: password,
|
||||
instituteCode: instituteCode,
|
||||
name: student.name,
|
||||
|
@ -1,3 +1,5 @@
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:background_fetch/background_fetch.dart';
|
||||
import 'package:filcnaplo/api/providers/user_provider.dart';
|
||||
import 'package:filcnaplo/api/providers/database_provider.dart';
|
||||
@ -53,10 +55,13 @@ class Startup {
|
||||
FlutterLocalNotificationsPlugin();
|
||||
|
||||
// Get permission to show notifications
|
||||
flutterLocalNotificationsPlugin
|
||||
if (Platform.isAndroid) {
|
||||
await flutterLocalNotificationsPlugin
|
||||
.resolvePlatformSpecificImplementation<
|
||||
AndroidFlutterLocalNotificationsPlugin>()!
|
||||
.requestPermission();
|
||||
}
|
||||
else if (Platform.isIOS) {
|
||||
await flutterLocalNotificationsPlugin
|
||||
.resolvePlatformSpecificImplementation<
|
||||
IOSFlutterLocalNotificationsPlugin>()
|
||||
@ -65,6 +70,8 @@ class Startup {
|
||||
badge: true,
|
||||
sound: true,
|
||||
);
|
||||
}
|
||||
else if (Platform.isMacOS) {
|
||||
await flutterLocalNotificationsPlugin
|
||||
.resolvePlatformSpecificImplementation<
|
||||
MacOSFlutterLocalNotificationsPlugin>()
|
||||
@ -73,6 +80,7 @@ class Startup {
|
||||
badge: true,
|
||||
sound: true,
|
||||
);
|
||||
}
|
||||
|
||||
// Platform specific settings
|
||||
final DarwinInitializationSettings initializationSettingsDarwin =
|
||||
|
@ -48,7 +48,7 @@ dependencies:
|
||||
crypto: ^3.0.2
|
||||
elegant_notification: ^1.6.1
|
||||
flutter_feather_icons: ^2.0.0+1
|
||||
live_activities: ^1.0.0
|
||||
live_activities: ^1.7.4
|
||||
animated_flip_counter: ^0.2.5
|
||||
lottie: ^1.4.3
|
||||
rive: ^0.9.1
|
||||
|
@ -169,7 +169,7 @@ class KretaClient {
|
||||
Map? loginRes = await postAPI(KretaAPI.login,
|
||||
headers: headers,
|
||||
body: User.loginBody(
|
||||
username: loginUser.username.replaceAll(' ', '') + ' ',
|
||||
username: loginUser.username,
|
||||
password: loginUser.password,
|
||||
instituteCode: loginUser.instituteCode,
|
||||
));
|
||||
|
@ -280,7 +280,7 @@ class _GradeSubjectViewState extends State<GradeSubjectView> {
|
||||
|
||||
void gradeCalc(BuildContext context) {
|
||||
// Scroll to the top of the page
|
||||
_scrollController.animateTo(75,
|
||||
_scrollController.animateTo(100,
|
||||
duration: const Duration(milliseconds: 500), curve: Curves.ease);
|
||||
|
||||
calculatorProvider.clear();
|
||||
|
Loading…
x
Reference in New Issue
Block a user