saveNewCard method
void
saveNewCard()
Implementation
void saveNewCard() {
var boardProv = ref.read(ProviderList.boardProvider);
boardProv.board.lists[boardProv.board.newCardListIndex!]
.items[boardProv.board.newCardIndex!].child = Container(
decoration: BoxDecoration(
border: Border.all(color: Colors.grey.shade200),
borderRadius: BorderRadius.circular(4
),
color: Colors.white,
),
margin: const EdgeInsets.only(bottom: 10),
padding: const EdgeInsets.all(12),
child: Text(boardProv.board.newCardTextController.text,
style: boardProv.board.textStyle),
);
boardProv.board.lists[boardProv.board.newCardListIndex!]
.items[boardProv.board.newCardIndex!].prevChild =
boardProv.board.lists[boardProv.board.newCardListIndex!]
.items[boardProv.board.newCardIndex!].child;
boardProv.board.newCardFocused = false;
boardProv.board.lists[boardProv.board.newCardListIndex!]
.items[boardProv.board.newCardIndex!].isNew = false;
boardProv.board.newCardTextController.clear();
boardProv.board.lists[boardProv.board.newCardListIndex!]
.items[boardProv.board.newCardIndex!].setState!();
boardProv.board.newCardIndex = null;
boardProv.board.newCardListIndex = null;
log("TAPPED");
}