kickstart.nvim/snippets/dart.snippets

30 lines
739 B
Plaintext

# snippet wb "Usecase for widgetbook"
# // coverage:ignore-start
# @UseCase(name: '$1', type: $1)
# Widget $2(BuildContext context) {
# return $3;
# }
# // coverage:ignore-end
#
snippet tmt "Theme textTheme"
Theme.of(context).textTheme.$1
snippet phr "AppLocalizations"
AppLocalizations.of(context)!.$1
snippet imploc "Import AppLocalizations"
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
snippet gap "Create a gap with const"
const Gap($1),
snippet useEffect "Create an empty useEffect"
useEffect(() {
$1
return;
}, []);
snippet clm "Create column with empty children"
Column(children: [
$1
],)
snippet row "Create row with empty children"
Row(children: [
$1
],)