Skip to content

Commit

Permalink
minor UI improvements, optimization and code refactorin
Browse files Browse the repository at this point in the history
  • Loading branch information
aldrinzigmundv committed Oct 8, 2023
1 parent a064c8e commit 4e73650
Show file tree
Hide file tree
Showing 13 changed files with 339 additions and 302 deletions.
4 changes: 2 additions & 2 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ android {
// For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
minSdkVersion 24
targetSdkVersion 33
versionCode 2
versionName "2.0.0"
versionCode 3
versionName "2.5.0"
}

signingConfigs {
Expand Down
Binary file modified assets/icons/librum.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 0 additions & 2 deletions lib/data/categories.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import 'package:flutter/material.dart';

//Holds the App Drawer data which includes all verse categories

class CategoryEntry {
String name;
IconData icon;
Expand Down
2 changes: 1 addition & 1 deletion lib/data/verses.dart
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ class Verses {
Verse(category: "Sacrifice", verse: "Mark 10:45", text: "For even the Son of Man did not come to be served, but to serve, and to give his life as a ransom for many.”"),
Verse(category: "Sacrifice", verse: "Matthew 16:24", text: "Then Jesus said to his disciples, “Whoever wants to be my disciple must deny themselves and take up their cross and follow me."),
Verse(category: "Sacrifice", verse: "1 Peter 2:21", text: "To this you were called, because Christ suffered for you, leaving you an example, that you should follow in his steps."),
Verse(category: "Sacrifice", verse: "Romans 12:1-2", text: "Therefore, I urge you, brothers and sisters, in view of God’s mercy, to offer your bodies as a living sacrifice, holy and pleasing to God—this is your true and proper worship. 2 Do not conform to the pattern of this world, but be transformed by the renewing of your mind. Then you will be able to test and approve what God’s will is—his good, pleasing and perfect will."),
Verse(category: "Sacrifice", verse: "Romans 12:1-2", text: "Therefore, I urge you, brothers and sisters, in view of God’s mercy, to offer your bodies as a living sacrifice, holy and pleasing to God—this is your true and proper worship. Do not conform to the pattern of this world, but be transformed by the renewing of your mind. Then you will be able to test and approve what God’s will is—his good, pleasing and perfect will."),

Verse(category: "Wealth", verse: "Luke 16:11", text: "So if you have not been trustworthy in handling worldly wealth, who will trust you with true riches?"),
Verse(category: "Wealth", verse: "Matthew 6:19-21", text: "“Do not store up for yourselves treasures on earth, where moths and vermin destroy, and where thieves break in and steal. But store up for yourselves treasures in heaven, where moths and vermin do not destroy, and where thieves do not break in and steal. For where your treasure is, there your heart will be also."),
Expand Down
19 changes: 8 additions & 11 deletions lib/main.dart
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
import 'package:flutter/material.dart';
import 'package:librum/pages/home.dart';
import 'package:flutter/services.dart';
import 'package:librum/data/verses.dart';
import 'package:librum/pages/loadingpage.dart';

void main() {

//initializes verses and getting random verse then passes it on to HomePage in home.dart

Verses verses = Verses();

late int randomVerse = verses.getRandom();

runApp(HomePage(verses: verses, randomVerse: randomVerse));
runApp(MaterialApp(
title: "Librum",
initialRoute: '/',
routes: {
'/': (context) => const LoadingPage(),
},
));
}

57 changes: 0 additions & 57 deletions lib/pages/donate.dart

This file was deleted.

67 changes: 67 additions & 0 deletions lib/pages/donationpage.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';

//Builds the Donate Page

class DonationPage extends StatelessWidget {
DonationPage({super.key});

copyMoneroAddress(context) {
Clipboard.setData(ClipboardData(
text:
'86cQoPfKTJ2bRfGH5Ts2kzaXCRcVRiX8CUHKc9xmeUmQ8YM8Uzk9S97T5gQaqYu58C9wuFK7opDH7cM9EJyR4V5LAq9RGv4'));
ScaffoldMessenger.of(context).showSnackBar(SnackBar(
content: Text("Verse copied to clipboard."),
duration: Duration(seconds: 2),
));
}

@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
centerTitle: true,
backgroundColor: Colors.purple.shade700,
iconTheme: const IconThemeData(color: Colors.white),
title: Text("Donate", style: const TextStyle(color: Colors.white)),
),
backgroundColor: Colors.grey[50],
body: Center(
child: SingleChildScrollView(
child: Column(
children: [
Padding(
padding: EdgeInsets.all(9.0),
child: Text(
"Donate XMR to Support this App",
style: TextStyle(fontSize: 21),
),
),
Padding(
padding: EdgeInsets.all(9.0),
child: GestureDetector(
onTap: () {
copyMoneroAddress(context);
},
child: Card(
child: Padding(
padding: EdgeInsets.all(3.0),
child: Image.asset('assets/images/XMR.png'),
),
),
),
),
Padding(
padding: EdgeInsets.all(9.0),
child: Text(
"Tap the QR Code to get the XMR Wallet Address.",
style: TextStyle(fontSize: 15),
),
),
],
),
),
),
);
}
}
125 changes: 0 additions & 125 deletions lib/pages/home.dart

This file was deleted.

Loading

0 comments on commit 4e73650

Please sign in to comment.