Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Dismissible(
- direction: DismissDirection.endToStart,
- key: Key(widget.data[i]),
- onDismissed: (direction) {
- widget.onRemoveRequest(i, widget.data[i]);
- },
- background: Container(
- color: Colors.red,
- child: Row(
- crossAxisAlignment: CrossAxisAlignment.center,
- mainAxisAlignment: MainAxisAlignment.end,
- children: <Widget>[
- Padding(
- padding: const EdgeInsets.only(right: 20.0),
- child: Text(
- "Delete",
- textAlign: TextAlign.right,
- style: TextStyle(
- color: Colors.white,
- fontWeight: FontWeight.w500,
- fontSize: 16.0,
- ),
- ),
- ),
- ],
- ),
- ),
- child: CustomTextField(
- padding: const EdgeInsets.only(left: 30.0, right: 30.0),
- hintText: widget.newEntryHint,
- text: widget.data[i],
- keyboardType: TextInputType.multiline,
- onChanged: (val) {
- widget.onChanged(i, val);
- },
- ),
- )
- Dismissible(
- key: UniqueKey(),
- ...
- )
Add Comment
Please, Sign In to add comment