Skip to content

Commit f8b1197

Browse files
Modify mediaquery code and update version
1 parent 807cd7c commit f8b1197

File tree

5 files changed

+14
-13
lines changed

5 files changed

+14
-13
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,13 +71,13 @@ A simple and intuitive Flutter app to track your daily, weekly, and monthly expe
7171
## 📦 Download Releases
7272

7373
- 💻 **Windows (.7z):**
74-
[Download for Windows v1.0.0+1](https://github.com/omnitechphilippines/expense-tracker/releases/download/v1.0.0%2B1/windows-release-v1.0.0%2B1.7z)
74+
[Download for Windows {{VERSION}}](https://github.com/omnitechphilippines/expense-tracker/releases/download/{{ENCODED_VERSION}}/windows-release-{{ENCODED_VERSION}}.7z)
7575

7676
- 📱 **Android (.apk):**
77-
[Download for Android v1.0.0+1](https://github.com/omnitechphilippines/expense-tracker/releases/download/v1.0.0%2B1/app-release-v1.0.0%2B1.apk)
77+
[Download for Android {{VERSION}}](https://github.com/omnitechphilippines/expense-tracker/releases/download/{{ENCODED_VERSION}}/app-release-{{ENCODED_VERSION}}.apk)
7878

7979
- 🌐 **Web build (.7z):**
80-
[Download Web Build v1.0.0+1](https://github.com/omnitechphilippines/expense-tracker/releases/download/v1.0.0%2B1/web-release-v1.0.0%2B1.7z)
80+
[Download Web Build {{VERSION}}](https://github.com/omnitechphilippines/expense-tracker/releases/download/{{ENCODED_VERSION}}/web-release-{{ENCODED_VERSION}}.7z)
8181

8282
> You can also find all versions in the [Releases Page](https://github.com/omnitechphilippines/expense-tracker/releases)
8383

lib/main.dart

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -79,15 +79,16 @@ class _MyHomePageState extends State<MyHomePage> {
7979

8080
@override
8181
Widget build(BuildContext context) {
82-
final MediaQueryData mediaQuery = MediaQuery.of(context);
82+
final Orientation orientation = MediaQuery.orientationOf(context);
83+
final EdgeInsets padding = MediaQuery.paddingOf(context);
8384
final Size size = MediaQuery.sizeOf(context);
84-
final bool isLandscape = mediaQuery.orientation == Orientation.landscape;
85+
final bool isLandscape = orientation == Orientation.landscape;
8586
final bool isDarkMode = Theme.of(context).brightness == Brightness.dark;
8687
final AppBar appBar = AppBar(title: Text('Personal Expenses', style: TextStyle(color: kColorScheme.onPrimary, fontSize: 20, fontFamily: 'Quicksand')), actions: <Widget>[IconButton(onPressed: () => _addNewTransactionModal(context), icon: const Icon(Icons.add))]);
8788
final CupertinoNavigationBar iosAppBar = CupertinoNavigationBar(middle: const Text('Personal Expenses'), trailing: GestureDetector(onTap: () => _addNewTransactionModal(context), child: const Icon(CupertinoIcons.add)));
88-
final SizedBox smallChartWidget = SizedBox(height: (size.height - appBar.preferredSize.height - mediaQuery.padding.top) * 0.3, child: Chart(recentTransactions: _recentTransactions));
89-
final SizedBox bigChartWidget = SizedBox(height: (size.height - appBar.preferredSize.height - mediaQuery.padding.top) * 0.7, child: Chart(recentTransactions: _recentTransactions));
90-
final SizedBox transactionWidget = SizedBox(height: (size.height - appBar.preferredSize.height - mediaQuery.padding.top) * 0.7, child: TransactionList(transactions: _transactions, deleteTransaction: _deleteTransaction, isDarkMode: isDarkMode));
89+
final SizedBox smallChartWidget = SizedBox(height: (size.height - appBar.preferredSize.height - padding.top) * 0.3, child: Chart(recentTransactions: _recentTransactions));
90+
final SizedBox bigChartWidget = SizedBox(height: (size.height - appBar.preferredSize.height - padding.top) * 0.7, child: Chart(recentTransactions: _recentTransactions));
91+
final SizedBox transactionWidget = SizedBox(height: (size.height - appBar.preferredSize.height - padding.top) * 0.7, child: TransactionList(transactions: _transactions, deleteTransaction: _deleteTransaction, isDarkMode: isDarkMode));
9192
final SafeArea body = SafeArea(
9293
child: SingleChildScrollView(
9394
child: Column(

lib/widgets/new_transaction.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ class _NewTransactionState extends State<NewTransaction> {
4141
final bool isDarkMode = Theme.of(context).brightness == Brightness.dark;
4242
return SingleChildScrollView(
4343
child: Container(
44-
padding: EdgeInsets.fromLTRB(10, 10, 10, MediaQuery.of(context).viewInsets.bottom + 10),
44+
padding: EdgeInsets.fromLTRB(10, 10, 10, MediaQuery.viewInsetsOf(context).bottom + 10),
4545
child: Column(
4646
crossAxisAlignment: CrossAxisAlignment.end,
4747
children: <Widget>[

pubspec.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: expense_tracker
2-
description: "A new Flutter project."
2+
description: "A simple and intuitive Flutter app to track your daily, weekly, and monthly expenses."
33
# The following line prevents the package from being accidentally published to
44
# pub.dev using `flutter pub publish`. This is preferred for private packages.
55
publish_to: 'none' # Remove this line if you wish to publish to pub.dev
@@ -16,7 +16,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
1616
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
1717
# In Windows, build-name is used as the major, minor, and patch parts
1818
# of the product and file versions while build-number is used as the build suffix.
19-
version: 1.0.0+1
19+
version: 1.0.1+1
2020

2121
environment:
2222
sdk: ^3.7.0

web/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
<meta charset="UTF-8">
2020
<meta content="IE=Edge" http-equiv="X-UA-Compatible">
21-
<meta name="description" content="A new Flutter project.">
21+
<meta name="description" content="A simple and intuitive Flutter app to track your daily, weekly, and monthly expenses.">
2222

2323
<!-- iOS meta tags & icons -->
2424
<meta name="mobile-web-app-capable" content="yes">
@@ -33,6 +33,6 @@
3333
<link rel="manifest" href="manifest.json">
3434
</head>
3535
<body>
36-
<script src="flutter_bootstrap.js" async></script>
36+
<script src="flutter_bootstrap.js" async></script>
3737
</body>
3838
</html>

0 commit comments

Comments
 (0)