diff options
Diffstat (limited to 'lib/views/recipe_view.dart')
-rw-r--r-- | lib/views/recipe_view.dart | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/lib/views/recipe_view.dart b/lib/views/recipe_view.dart index f512770..faaa0ca 100644 --- a/lib/views/recipe_view.dart +++ b/lib/views/recipe_view.dart @@ -28,10 +28,10 @@ class RecipeView extends StatefulWidget { final Function? showToastCallback; @override - _RecipeViewState createState() => _RecipeViewState(); + RecipeViewState createState() => RecipeViewState(); } -class _RecipeViewState extends State<RecipeView> { +class RecipeViewState extends State<RecipeView> { final GlobalKey<FormState> _formKey = GlobalKey<FormState>(); final GlobalKey<ScaffoldState> _scaffoldKey = GlobalKey<ScaffoldState>(); final TextEditingController _controller1 = TextEditingController(); @@ -170,7 +170,7 @@ class _RecipeViewState extends State<RecipeView> { Widget _buildUtilityRow() { if (widget.remote) { - return SizedBox( + return const SizedBox( height: 10.0, width: double.infinity, ); @@ -248,11 +248,11 @@ class _RecipeViewState extends State<RecipeView> { Widget _buildDescriptionInput() { return Padding( padding: const EdgeInsets.all(18.0), - child: _isEditModeEnabled ? _buildInputDescriptuion() : _buildMarkdownDescription(), + child: _isEditModeEnabled ? _buildInputDescription() : _buildMarkdownDescription(), ); } - TextField _buildInputDescriptuion() { + TextField _buildInputDescription() { return TextField( expands: true, maxLines: null, @@ -263,7 +263,7 @@ class _RecipeViewState extends State<RecipeView> { focusNode: _detailsTextFocus, style: cRecipeDescriptionStyle, enableInteractiveSelection: true, - toolbarOptions: ToolbarOptions( + toolbarOptions: const ToolbarOptions( copy: true, cut: true, paste: true, @@ -276,7 +276,7 @@ class _RecipeViewState extends State<RecipeView> { return MarkdownBody( data: _controller2.text, selectable: true, - onTapLink: (text, href, title) => null, + onTapLink: (text, href, title) => {}, imageBuilder: (uri, title, alt) => Container(), // styleSheet: CustomMarkdownStyle(), ); @@ -333,7 +333,7 @@ class _RecipeViewState extends State<RecipeView> { List<Widget> _remoteDownloadAction = [ IconButton( - icon: Icon(Icons.save_alt_rounded), + icon: const Icon(Icons.save_alt_rounded), onPressed: () { downloadRecipe(context, recipe); }, @@ -341,7 +341,7 @@ class _RecipeViewState extends State<RecipeView> { ]; List<Widget> _remoteLookupAction = [ - IconButton( + const IconButton( icon: Icon(Icons.menu_open_rounded), onPressed: null, ), @@ -361,7 +361,7 @@ class _RecipeViewState extends State<RecipeView> { return AppBar( title: Text(_title), leading: IconButton( - icon: Icon(Icons.close), + icon: const Icon(Icons.close), onPressed: () { Navigator.pop(context); }, @@ -373,12 +373,12 @@ class _RecipeViewState extends State<RecipeView> { Widget _buildAppBarCheckActions() { if (_isEditModeEnabled) { return IconButton( - icon: Icon(Icons.check), + icon: const Icon(Icons.check), onPressed: _addRecipe, ); } else { return IconButton( - icon: Icon(Icons.edit), + icon: const Icon(Icons.edit), onPressed: () { _isEditModeEnabled = true; |