Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

android dependencies updates. #15

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
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
8 changes: 5 additions & 3 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ if (keystorePropertiesFile.exists()) {


android {
compileSdkVersion 30
compileSdkVersion 34

sourceSets {
main.java.srcDirs += 'src/main/kotlin'
Expand All @@ -43,10 +43,11 @@ android {
defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "com.mmas.money_assistant_2608"
minSdkVersion 16
targetSdkVersion 33
minSdkVersion flutter.minSdkVersion
targetSdkVersion 34
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
multiDexEnabled true
}

signingConfigs {
Expand All @@ -70,4 +71,5 @@ flutter {

dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'com.android.support:multidex:2.0.1'
}
17 changes: 9 additions & 8 deletions android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.mmas.money_assistant_2608">
<application
<application
android:label="MMAS"
android:icon="@mipmap/ic_launcher">
<activity
Expand All @@ -9,24 +9,25 @@
android:theme="@style/LaunchTheme"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
android:hardwareAccelerated="true"
android:windowSoftInputMode="adjustResize">
android:windowSoftInputMode="adjustResize"
android:exported="true"> <!-- Specify android:exported attribute -->
<!-- Specifies an Android theme to apply to this Activity as soon as
the Android process has started. This theme is visible to the user
while the Flutter UI initializes. After that, this theme continues
to determine the Window background behind the Flutter UI. -->
<meta-data
android:name="io.flutter.embedding.android.NormalTheme"
android:resource="@style/NormalTheme"
/>
android:name="io.flutter.embedding.android.NormalTheme"
android:resource="@style/NormalTheme"
/>
<!-- Displays an Android View that continues showing the launch screen
Drawable until Flutter paints its first frame, then this splash
screen fades out. A splash screen is useful to avoid any visual
gap between the end of Android's launch screen and the painting of
Flutter's first frame. -->
<meta-data
android:name="io.flutter.embedding.android.SplashScreenDrawable"
android:resource="@drawable/launch_background"
/>
android:name="io.flutter.embedding.android.SplashScreenDrawable"
android:resource="@drawable/launch_background"
/>
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
Expand Down
42 changes: 38 additions & 4 deletions android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,13 +1,45 @@
//buildscript {
// ext.kotlin_version = '1.8.0'
// repositories {
// google()
// jcenter()
// }
//
// dependencies {
// classpath 'com.android.tools.build:gradle:4.1.0'
// classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
// }
//}
//
//allprojects {
// repositories {
// google()
// jcenter()
// }
//}
//
//rootProject.buildDir = '../build'
//subprojects {
// project.buildDir = "${rootProject.buildDir}/${project.name}"
// project.evaluationDependsOn(':app')
//}
//
//tasks.register("clean", Delete) {
// delete rootProject.buildDir
//}

buildscript {
ext.kotlin_version = '1.8.0'
ext.kotlin_version = '1.7.10'
repositories {
google()
jcenter()
}

dependencies {
classpath 'com.android.tools.build:gradle:4.1.0'
classpath 'com.android.tools.build:gradle:7.3.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.google.gms:google-services:4.3.3'
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.7.1'
}
}

Expand All @@ -21,9 +53,11 @@ allprojects {
rootProject.buildDir = '../build'
subprojects {
project.buildDir = "${rootProject.buildDir}/${project.name}"
}
subprojects {
project.evaluationDependsOn(':app')
}

task clean(type: Delete) {
tasks.register("clean", Delete) {
delete rootProject.buildDir
}
}
4 changes: 2 additions & 2 deletions android/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#org.gradle.jvmargs=-Xmx1536M
org.gradle.jvmargs=-Xmx4G
android.useAndroidX=true
android.enableJetifier=true
org.gradle.java.home=C:/Program Files/Java/jdk-19
org.gradle.jvmargs=--add-opens java.base/java.io=ALL-UNNAMED

2 changes: 0 additions & 2 deletions lib/main.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// @dart=2.9


import 'package:money_assistant_2608/project/real_main.dart';

Expand Down
50 changes: 26 additions & 24 deletions lib/project/app_pages/calendar.dart
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ class _CalendarBodyState extends State<CalendarBody> {
},
child: SwipeActionCell(
key: ObjectKey(transactions[int]),
performsFirstActionWithFullSwipe: true,
// performsFirstActionWithFullSwipe: true,
trailingActions: <SwipeAction>[
SwipeAction(
title: getTranslated(context, 'Delete') ?? 'Delete',
Expand Down Expand Up @@ -449,32 +449,34 @@ class _BalanceState extends State<Balance> {
balance = income - expense;
}
}
Widget summaryFrame(String type, double amount, color) => Column(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
// this widget will never overflow
Text(
getTranslated(context, type)!,
style: TextStyle(
color: color,
fontSize: 15.sp,
fontStyle: FontStyle.italic,
fontWeight: FontWeight.bold),
),
Text(format(amount.toDouble()) + ' ' + currency,
style: GoogleFonts.aBeeZee(
Widget summaryFrame(String type, double amount, color) => SingleChildScrollView(
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
// this widget will never overflow
Text(
getTranslated(context, type)!,
style: TextStyle(
color: color,
fontSize: (format(amount.toDouble()).length > 19)
? 11.5.sp
: format(amount.toDouble()).length > 14
? 14.sp
: 18.sp,
fontSize: 15.sp,
fontStyle: FontStyle.italic,
fontWeight: FontWeight.bold),
overflow: TextOverflow.ellipsis)
],
);
),
Text(format(amount.toDouble()) + ' ' + currency,
style: GoogleFonts.aBeeZee(
color: color,
fontSize: (format(amount.toDouble()).length > 19)
? 11.5.sp
: format(amount.toDouble()).length > 14
? 14.sp
: 18.sp,
fontStyle: FontStyle.italic,
fontWeight: FontWeight.bold),
overflow: TextOverflow.ellipsis)
],
),
);
return Container(
color: Colors.white54,
height: 69.h,
Expand Down
60 changes: 30 additions & 30 deletions lib/project/app_pages/input.dart
Original file line number Diff line number Diff line change
Expand Up @@ -658,36 +658,36 @@ class _DateCardState extends State<DateCard> {
),
),
Spacer(),
GestureDetector(
behavior: HitTestBehavior.translucent,
onTap: () {
if (_pc.isPanelOpen) {
_pc.close();
}
Navigator.of(context).push(
showPicker(
cancelText: getTranslated(context, 'Cancel') ?? 'Cancel',
okText: getTranslated(context, 'Ok') ?? 'Ok',
unselectedColor: grey,
dialogInsetPadding: EdgeInsets.symmetric(
horizontal: 50.w, vertical: 30.0.h),
elevation: 12,
context: context,
value: selectedTime,
is24HrFormat: true,
onChange: (value) => setState(() {
selectedTime = value;
model.time = value.format(context);
})),
);
},
child: Text(
model.time!,
style: GoogleFonts.aBeeZee(
fontSize: 21.5.sp,
),
),
)
// GestureDetector(
// behavior: HitTestBehavior.translucent,
// onTap: () {
// if (_pc.isPanelOpen) {
// _pc.close();
// }
// Navigator.of(context).push(
// showPicker(
// cancelText: getTranslated(context, 'Cancel') ?? 'Cancel',
// okText: getTranslated(context, 'Ok') ?? 'Ok',
// unselectedColor: grey,
// dialogInsetPadding: EdgeInsets.symmetric(
// horizontal: 50.w, vertical: 30.0.h),
// elevation: 12,
// context: context,
// // value: selectedTime,
// is24HrFormat: true,
// onChange: (value) => setState(() {
// selectedTime = value;
// model.time = value.format(context);
// }), value: ),
// );
// },
// child: Text(
// model.time!,
// style: GoogleFonts.aBeeZee(
// fontSize: 21.5.sp,
// ),
// ),
// )
],
),
);
Expand Down
18 changes: 10 additions & 8 deletions lib/project/app_pages/report.dart
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,12 @@ class _ReportBodyState extends State<ReportBody> {
builder: (BuildContext context,
AsyncSnapshot<List<InputModel>> snapshot) {
connectionUI(snapshot);
if (snapshot.data == null ||
snapshot.connectionState == ConnectionState.waiting) {
return SizedBox();
if (snapshot.connectionState == ConnectionState.waiting) {
return Center(child: CircularProgressIndicator());
} else if (snapshot.hasError) {
return Center(child: Text('Error: ${snapshot.error}'));
} else if (!snapshot.hasData || snapshot.data!.isEmpty) {
return Center(child: Text('No data found'));
} else {
double yearAmount = 0;
DateTime date(int duration) =>
Expand All @@ -122,7 +125,6 @@ class _ReportBodyState extends State<ReportBody> {
return (year % 4 == 0) && (year % 100 != 0) ||
(year % 400 == 0);
}

// widget.transactions.sort((a, b) => a.date!.compareTo(b.date!));
List<InputModel> sortByCategory(
List<InputModel> data, String type) {
Expand Down Expand Up @@ -240,8 +242,8 @@ class _ReportBodyState extends State<ReportBody> {
width: 4.h,
),
majorTickLines: MajorTickLines(size: 5.sp)),
series: _getGradientAreaSeries(
this.widget.type, monthBasedTransactionList),
// series: _getGradientAreaSeries(
// this.widget.type, monthBasedTransactionList),
onMarkerRender: (MarkerRenderArgs args) {
if (this.widget.type == 'Income') {
if (args.pointIndex == 0) {
Expand Down Expand Up @@ -432,8 +434,8 @@ class _ReportBodyState extends State<ReportBody> {
key: ObjectKey(
selectedTransactions[
int]),
performsFirstActionWithFullSwipe:
true,
// performsFirstActionWithFullSwipe:
// true,
trailingActions: <
SwipeAction>[
SwipeAction(
Expand Down
9 changes: 6 additions & 3 deletions lib/project/auth_pages/sign_in.dart
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ class SignIn extends StatelessWidget {
);
return FlutterLogin(
title: 'MMAS',
logo: 'Hi!',
onSignup: _authenticateUsers,
// logo: 'Hi!',
// onSignup: _authenticateUsers,
onLogin: _authenticateUsers,
onRecoverPassword: _onRecoverPassword,
onSubmitAnimationCompleted: () {
Expand Down Expand Up @@ -68,14 +68,17 @@ class SignIn extends StatelessWidget {
),
LoginProvider(
icon: FontAwesomeIcons.linkedinIn,
label: 'Linkdein',
callback: () async {
print('start linkdin sign in');
// print('start linkdin sign in');

await Future.delayed(Duration(seconds: 1));
print('stop linkdin sign in');
return null;
},
),
LoginProvider(
label: 'Github',
icon: FontAwesomeIcons.githubAlt,
callback: () async {
print('start github sign in');
Expand Down
Loading