Skip to content
This repository has been archived by the owner on Sep 1, 2021. It is now read-only.

Commit

Permalink
Merge pull request #102 from Viktoriaschule/fix/loading-bumping
Browse files Browse the repository at this point in the history
Fix loading bumping size of list group
  • Loading branch information
fingeg authored Feb 27, 2020
2 parents f79f263 + 85ed181 commit dbcca7c
Showing 1 changed file with 51 additions and 37 deletions.
88 changes: 51 additions & 37 deletions lib/widgets/list_group.dart
Original file line number Diff line number Diff line change
Expand Up @@ -94,47 +94,61 @@ class _ListGroupState extends Interactor<ListGroup>
child: Column(
children: [
Container(
margin: EdgeInsets.only(bottom: 10),
padding: EdgeInsets.only(top: 15, left: 20, right: 10),
child: Row(
children: <Widget>[
Expanded(
child: Text(
widget.title,
style: TextStyle(
fontWeight: FontWeight.w100,
color: ThemeWidget.of(context).textColor,
fontSize: 18,
),
),
),
Container(
width: 31,
child: AnimatedCrossFade(
duration: Duration(milliseconds: 100),
firstChild: Container(
margin: EdgeInsets.all(5.5),
child: CustomCircularProgressIndicator(
height: 20,
width: 20,
padding: EdgeInsets.only(left: 20, right: 10),
child: ConstrainedBox(
constraints: BoxConstraints(minHeight: 31),
child: Row(
children: [
Expanded(
child: Container(
margin: EdgeInsets.only(top: 10),
child: Text(
widget.title,
style: TextStyle(
fontWeight: FontWeight.w100,
color: ThemeWidget.of(context).textColor,
fontSize: 18,
),
),
),
secondChild: widget.counter > 0
? Text(
'+${widget.counter}',
style: TextStyle(
fontWeight: FontWeight.w100,
color: ThemeWidget.of(context).textColor,
fontSize: 18,
),
Container(
margin: EdgeInsets.only(top: 10),
width: 31,
height: 31,
child: Stack(
children: [
AnimatedOpacity(
duration: Duration(milliseconds: 100),
opacity:
widget.loadingKeys != null && _isLoading ? 1 : 0,
child: Center(
child: CustomCircularProgressIndicator(
height: 20,
width: 20,
),
)
: Container(),
crossFadeState: widget.loadingKeys != null && _isLoading
? CrossFadeState.showFirst
: CrossFadeState.showSecond,
),
),
AnimatedOpacity(
duration: Duration(milliseconds: 100),
opacity:
widget.loadingKeys != null && _isLoading ? 0 : 1,
child: Center(
child: Text(
'+${widget.counter}',
style: TextStyle(
fontWeight: FontWeight.w100,
color: ThemeWidget.of(context).textColor,
fontSize: 18,
),
),
),
),
],
),
),
),
],
],
),
),
),
...widget.children,
Expand Down

0 comments on commit dbcca7c

Please sign in to comment.