Skip to content

Commit 2043920

Browse files
committed
Fix bug ultimo item da lista
Correção de bug da lista em movimentaçoes da Home, onde o ultimo item ficava escondido .
1 parent 7e52b9a commit 2043920

File tree

6 files changed

+58
-21
lines changed

6 files changed

+58
-21
lines changed

.DS_Store

6 KB
Binary file not shown.

finacash/android/app/build.gradle

Lines changed: 21 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,13 @@ apply plugin: 'com.android.application'
2525
apply plugin: 'kotlin-android'
2626
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
2727

28-
android {
28+
def keystoreProperties = new Properties()
29+
def keystorePropertiesFile = rootProject.file('key.properties')
30+
if (keystorePropertiesFile.exists()) {
31+
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
32+
}
33+
34+
android {
2935
compileSdkVersion 28
3036

3137
sourceSets {
@@ -46,13 +52,20 @@ android {
4652
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
4753
}
4854

49-
buildTypes {
50-
release {
51-
// TODO: Add your own signing config for the release build.
52-
// Signing with the debug keys for now, so `flutter run --release` works.
53-
signingConfig signingConfigs.debug
54-
}
55-
}
55+
signingConfigs {
56+
release {
57+
keyAlias keystoreProperties['keyAlias']
58+
keyPassword keystoreProperties['keyPassword']
59+
storeFile keystoreProperties['storeFile'] ? file(keystoreProperties['storeFile']) : null
60+
storePassword keystoreProperties['storePassword']
61+
}
62+
}
63+
buildTypes {
64+
release {
65+
signingConfig signingConfigs.release
66+
}
67+
}
68+
5669
}
5770

5871
flutter {

finacash/lib/Widgets/CardMovimentacoesItem.dart

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,10 @@ import 'package:flutter/material.dart';
66
class CardMovimentacoesItem extends StatelessWidget {
77

88
final Movimentacoes mov;
9+
final bool lastItem;
910

1011

11-
const CardMovimentacoesItem({Key key, this.mov}) : super(key: key);
12+
const CardMovimentacoesItem({Key key, this.mov,this.lastItem=false}) : super(key: key);
1213

1314
_dialogConfimacao(BuildContext context, double width){
1415
showDialog(
@@ -88,8 +89,10 @@ class CardMovimentacoesItem extends StatelessWidget {
8889
var height = MediaQuery.of(context).size.height;
8990

9091

91-
92-
return GestureDetector(
92+
93+
return Column(
94+
children: <Widget>[
95+
GestureDetector(
9396
onLongPress: (){
9497
//_dialogConfimacao(context, width);
9598

@@ -122,11 +125,14 @@ class CardMovimentacoesItem extends StatelessWidget {
122125
),
123126
Padding(
124127
padding: EdgeInsets.only(left: width * 0.03),
125-
child: Text(mov.descricao,textAlign: TextAlign.start, style: TextStyle(
128+
child: Container(
129+
width: width * 0.4,
130+
child: Text(mov.descricao,overflow: TextOverflow.ellipsis, textAlign: TextAlign.start, style: TextStyle(
126131
color:mov.tipo == "r" ? Colors.green[700]:Colors.red[700],
127132
fontWeight: FontWeight.bold,
128133
fontSize: width * 0.044,
129134
),),
135+
)
130136
),
131137
],
132138
),
@@ -139,6 +145,10 @@ class CardMovimentacoesItem extends StatelessWidget {
139145
],
140146
),
141147
),
148+
),
149+
lastItem ==true ? Container(height:80,) : Container()
150+
],
142151
);
152+
143153
}
144154
}

finacash/lib/Widgets/CustomDialog.dart

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ class _CustomDialogState extends State<CustomDialog> {
4545
Flexible(
4646
child: TextField(
4747
controller: _controllerValor,
48+
maxLength: 7,
4849
style: TextStyle(fontSize: width * 0.05),
4950
keyboardType:
5051
TextInputType.numberWithOptions(decimal: true),
@@ -120,6 +121,7 @@ class _CustomDialogState extends State<CustomDialog> {
120121
),
121122
TextField(
122123
controller: _controllerDesc,
124+
maxLength: 20,
123125
style: TextStyle(fontSize: width * 0.05),
124126
keyboardType: TextInputType.text,
125127
maxLines: 1,

finacash/lib/screen/HomePage.dart

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,10 @@ class _HomePageState extends State<HomePage> {
4848
}
4949

5050
_saldoTamanho(String conteudo) {
51-
if (conteudo.length > 5) {
52-
return width * 0.2;
51+
if (conteudo.length > 8) {
52+
return width * 0.08;
5353
} else {
54-
return width * 0.3;
54+
return width * 0.1;
5555
}
5656
}
5757

@@ -99,6 +99,7 @@ class _HomePageState extends State<HomePage> {
9999
});
100100
}
101101

102+
102103
@override
103104
void initState() {
104105
// TODO: implement initState
@@ -134,6 +135,7 @@ class _HomePageState extends State<HomePage> {
134135
body: SingleChildScrollView(
135136
primary: false,
136137
physics: NeverScrollableScrollPhysics(),
138+
//physics: ClampingScrollPhysics(),
137139
//height: height,
138140
//width: width,
139141
child: Column(
@@ -206,16 +208,21 @@ class _HomePageState extends State<HomePage> {
206208
children: <Widget>[
207209
Padding(
208210
padding: EdgeInsets.only(left: width * 0.05),
209-
child: Text(
211+
child: Container(
212+
width: width * 0.6,
213+
214+
child: Text(
210215
saldoAtual,
216+
overflow: TextOverflow.ellipsis,
211217
style: TextStyle(
212218
color: Colors
213219
.lightBlue[700], //Colors.indigo[400],
214220
fontWeight: FontWeight.bold,
215-
fontSize:
216-
width * 0.1 //_saldoTamanho(saldoAtual)
221+
fontSize: _saldoTamanho(saldoAtual),
222+
//width * 0.1 //_saldoTamanho(saldoAtual)
217223
),
218224
),
225+
),
219226
),
220227
Padding(
221228
padding: EdgeInsets.only(right: width * 0.04),
@@ -363,8 +370,8 @@ class _HomePageState extends State<HomePage> {
363370
},
364371
key: ValueKey(mov.id),
365372
background: Container(
366-
padding: EdgeInsets.only(right: 10),
367-
alignment: Alignment.centerRight,
373+
padding: EdgeInsets.only(right: 10 ,top: width * 0.04),
374+
alignment: Alignment.topRight,
368375
color: Colors.red,
369376
child: Icon(
370377
Icons.delete_outline,
@@ -374,11 +381,16 @@ class _HomePageState extends State<HomePage> {
374381
),
375382
child: CardMovimentacoesItem(
376383
mov: mov,
384+
lastItem: listmovimentacoes[index] == listmovimentacoes.last? true : false,
377385
),
378386
);
379387
},
380388
),
381389
),
390+
),
391+
Padding(
392+
padding: EdgeInsets.only(top: 20),
393+
child: Text( "EEEEEEEEE"),
382394
)
383395
],
384396
),

finacash/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ description: A new Flutter application.
1111
# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
1212
# Read more about iOS versioning at
1313
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
14-
version: 1.0.0+1
14+
version: 1.0.1+2
1515

1616
environment:
1717
sdk: ">=2.1.0 <3.0.0"

0 commit comments

Comments
 (0)