Skip to content

Commit fff2fbe

Browse files
committed
small-patches
1 parent dca4f42 commit fff2fbe

File tree

4 files changed

+17
-7
lines changed

4 files changed

+17
-7
lines changed

lib/Widgets/Screen/Screen.dart

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ class ScreenState extends State<Screen> with AnimationControllerMixin {
3737

3838
Animation<double> popUpAnimation;
3939
bool inProgress = false;
40+
bool mounted = false;
4041
String popUpTitle;
4142
String popUpMessage;
4243

@@ -60,6 +61,7 @@ class ScreenState extends State<Screen> with AnimationControllerMixin {
6061
return;
6162
}
6263
setState(() {
64+
mounted = true;
6365
popUpMessage = message;
6466
popUpTitle = title;
6567
});
@@ -76,6 +78,9 @@ class ScreenState extends State<Screen> with AnimationControllerMixin {
7678
to: 0.0,
7779
onComplete: () {
7880
inProgress = false;
81+
setState(() {
82+
mounted = false;
83+
});
7984
}),
8085
]);
8186
}
@@ -84,6 +89,10 @@ class ScreenState extends State<Screen> with AnimationControllerMixin {
8489
final margin = AppDimensions.padding * 3;
8590
final borderRadius = BorderRadius.circular(6.0);
8691

92+
if (!mounted) {
93+
return Container();
94+
}
95+
8796
return Positioned(
8897
bottom: Utils.rangeMap(
8998
popUpAnimation.value,
@@ -102,6 +111,7 @@ class ScreenState extends State<Screen> with AnimationControllerMixin {
102111
duration: Duration(milliseconds: popUpTransitionDuration),
103112
onComplete: () {
104113
inProgress = false;
114+
mounted = false;
105115
},
106116
)
107117
]),

lib/screens/Download/Download.dart

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import 'dart:convert';
22

33
import 'package:flutter/material.dart';
4+
import 'package:flutter_uis/Utils.dart';
45
import 'package:flutter_vector_icons/flutter_vector_icons.dart';
56
import 'package:http/http.dart' as http;
67

@@ -87,14 +88,15 @@ class _DownloadScreenState extends State<DownloadScreen> {
8788
child: Column(
8889
crossAxisAlignment: CrossAxisAlignment.start,
8990
children: <Widget>[
91+
Utils.safePadding(context, "top"),
9092
Container(
9193
width: double.infinity,
9294
padding: EdgeInsets.all(AppDimensions.padding * 2),
9395
child: Text(
9496
"Download will start in browser",
9597
textAlign: TextAlign.center,
9698
style: TextStyle(
97-
fontSize: 14 + AppDimensions.ratio * 5,
99+
fontSize: 12 + AppDimensions.ratio * 4,
98100
),
99101
),
100102
),

lib/screens/Download/data.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@ final mobileLinks = [
88
"icon": MaterialCommunityIcons.google_play,
99
},
1010
{
11-
"key": "apk-release.apk",
11+
"key": "app-release.apk",
1212
"name": "Apk",
1313
"icon": MaterialCommunityIcons.android,
1414
}
1515
];
1616

1717
final desktopLinks = [
1818
{
19-
"key": "mac-release.zip",
19+
"key": "macos-release.zip",
2020
"name": "Mac",
2121
"icon": MaterialCommunityIcons.apple_finder,
2222
},

lib/screens/UiDetail/UIDetail.dart

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import 'package:flutter/material.dart';
22

33
import 'package:flutter_vector_icons/flutter_vector_icons.dart';
4-
import 'package:url_launcher/url_launcher.dart' as url;
54
import 'package:flutter_bloc/flutter_bloc.dart';
65

76
import 'package:flutter_uis/blocs/ui_bloc/bloc.dart';
@@ -66,7 +65,6 @@ class _UiDetailScreenState extends State<UiDetailScreen>
6665
image: ExactAssetImage(uiItem.thumbnail),
6766
fit: BoxFit.cover,
6867
),
69-
// color: Colors.red,
7068
),
7169
),
7270
);
@@ -279,10 +277,10 @@ class _UiDetailScreenState extends State<UiDetailScreen>
279277
arguments: {"designer": uiItem.designer, "id": uiItem.id},
280278
),
281279
),
282-
Utils.safePadding(context, 'bottom'),
283280
Padding(
284281
padding: EdgeInsets.only(top: safeOffset < 0 ? 0 : safeOffset),
285-
)
282+
),
283+
Utils.safePadding(context, 'bottom'),
286284
],
287285
),
288286
),

0 commit comments

Comments
 (0)