Properly implement the dismissable backgrounds.
This commit is contained in:
parent
595aaefedc
commit
0f65166123
@ -43,31 +43,22 @@ class _ExpensePageState extends State<ExpensePage> {
|
||||
child: Dismissible(
|
||||
key: Key(curr.toString()),
|
||||
background: Container(
|
||||
color: Colors.blue,
|
||||
color: Colors.red,
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
Container(
|
||||
color: Colors.red,
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
children: [
|
||||
Icon(Icons.delete),
|
||||
Text("Delete"),
|
||||
],
|
||||
),
|
||||
),
|
||||
Spacer(),
|
||||
Container(
|
||||
color: Colors.yellow,
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
children: [
|
||||
Text("Edit"),
|
||||
Icon(Icons.edit),
|
||||
],
|
||||
),
|
||||
),
|
||||
Icon(Icons.delete),
|
||||
Text("Delete"),
|
||||
],
|
||||
),
|
||||
),
|
||||
secondaryBackground: Container(
|
||||
color: Colors.yellow,
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.end,
|
||||
children: [
|
||||
Text("Edit"),
|
||||
Icon(Icons.edit),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
Loading…
x
Reference in New Issue
Block a user