diff --git a/lib/editors/checklist_editor.dart b/lib/editors/checklist_editor.dart index 31486556..e9cac7d5 100644 --- a/lib/editors/checklist_editor.dart +++ b/lib/editors/checklist_editor.dart @@ -367,7 +367,11 @@ class _ChecklistItemTileState extends State { dense: true, leading: Row( children: [ - Container(height: 24.0, width: 24.0, child: Icon(Icons.drag_handle)), + Container( + height: 24.0, + width: 24.0, + child: const Icon(Icons.drag_handle), + ), const SizedBox(width: 8.0), SizedBox( height: 24.0, diff --git a/lib/editors/common.dart b/lib/editors/common.dart index 5246dbfe..af2cf473 100644 --- a/lib/editors/common.dart +++ b/lib/editors/common.dart @@ -43,7 +43,7 @@ class EditorAppBar extends StatelessWidget implements PreferredSizeWidget { @required this.editorState, @required this.noteModified, this.extraButton, - }) : preferredSize = Size.fromHeight(kToolbarHeight), + }) : preferredSize = const Size.fromHeight(kToolbarHeight), super(key: key); @override @@ -97,7 +97,7 @@ class EditorBottomBar extends StatelessWidget { @override Widget build(BuildContext context) { var addIcon = IconButton( - icon: Icon(Icons.attach_file), + icon: const Icon(Icons.attach_file), onPressed: () { showModalBottomSheet( context: context, @@ -108,7 +108,7 @@ class EditorBottomBar extends StatelessWidget { ); var menuIcon = IconButton( - icon: Icon(Icons.more_vert), + icon: const Icon(Icons.more_vert), onPressed: () { showModalBottomSheet( context: context, @@ -133,7 +133,7 @@ class EditorBottomBar extends StatelessWidget { ), Expanded( child: FlatButton.icon( - icon: Icon(Icons.folder), + icon: const Icon(Icons.folder), label: Text(parentFolder.publicName), onPressed: () { var note = editorState.getNote(); @@ -159,7 +159,7 @@ Widget _buildAddBottomSheet( mainAxisSize: MainAxisSize.min, children: [ ListTile( - leading: Icon(Icons.camera), + leading: const Icon(Icons.camera), title: Text(tr('editors.common.takePhoto')), onTap: () async { try { @@ -177,7 +177,7 @@ Widget _buildAddBottomSheet( }, ), ListTile( - leading: Icon(Icons.image), + leading: const Icon(Icons.image), title: Text(tr('editors.common.addImage')), onTap: () async { try { @@ -213,7 +213,7 @@ Widget _buildBottomMenuSheet( mainAxisSize: MainAxisSize.min, children: [ ListTile( - leading: Icon(Icons.undo), + leading: const Icon(Icons.undo), title: Text(tr('editors.common.discard')), onTap: () { var note = editorState.getNote(); @@ -224,7 +224,7 @@ Widget _buildBottomMenuSheet( enabled: editorState.noteModified, ), ListTile( - leading: Icon(Icons.share), + leading: const Icon(Icons.share), title: Text(tr('editors.common.share')), onTap: () { var note = editorState.getNote(); diff --git a/lib/screens/filesystem_screen.dart b/lib/screens/filesystem_screen.dart index 2c642dda..5730ea55 100644 --- a/lib/screens/filesystem_screen.dart +++ b/lib/screens/filesystem_screen.dart @@ -108,7 +108,7 @@ class FileSystemView extends StatelessWidget { Widget _buildFolderTile(NotesFolderFS folder) { return ListTile( - leading: Icon(Icons.folder), + leading: const Icon(Icons.folder), title: Text(folder.name), dense: true, onTap: () => onFolderSelected(folder), @@ -117,7 +117,7 @@ class FileSystemView extends StatelessWidget { Widget _buildNoteTile(Note note) { return ListTile( - leading: Icon(Icons.note), + leading: const Icon(Icons.note), title: Text(note.fileName), dense: true, onTap: () => onNoteSelected(note), @@ -127,7 +127,7 @@ class FileSystemView extends StatelessWidget { Widget _buildIgnoredFileTile(IgnoredFile ignoredFile) { // FIXME: Paint with Ignored colours return ListTile( - leading: Icon(Icons.broken_image), + leading: const Icon(Icons.broken_image), title: Text(ignoredFile.fileName), dense: true, enabled: true, diff --git a/lib/screens/folder_view.dart b/lib/screens/folder_view.dart index 3d04259d..a01ff8f9 100644 --- a/lib/screens/folder_view.dart +++ b/lib/screens/folder_view.dart @@ -132,7 +132,7 @@ class _FolderViewState extends State { ), if (appState.remoteGitRepoConfigured) SyncButton(), IconButton( - icon: Icon(Icons.search), + icon: const Icon(Icons.search), onPressed: () { showSearch( context: context, diff --git a/lib/screens/settings_screen.dart b/lib/screens/settings_screen.dart index 06c27ef0..5fec055c 100644 --- a/lib/screens/settings_screen.dart +++ b/lib/screens/settings_screen.dart @@ -66,7 +66,7 @@ class SettingsListState extends State { key: gitAuthorKey, style: Theme.of(context).textTheme.headline6, decoration: InputDecoration( - icon: Icon(Icons.person), + icon: const Icon(Icons.person), hintText: tr('settings.author.hint'), labelText: tr('settings.author.label'), ), @@ -99,7 +99,7 @@ class SettingsListState extends State { style: Theme.of(context).textTheme.headline6, keyboardType: TextInputType.emailAddress, decoration: InputDecoration( - icon: Icon(Icons.email), + icon: const Icon(Icons.email), hintText: tr('settings.email.hint'), labelText: tr('settings.email.label'), ), diff --git a/lib/setup/repo_selector.dart b/lib/setup/repo_selector.dart index 0817c3ed..8b64aa3f 100644 --- a/lib/setup/repo_selector.dart +++ b/lib/setup/repo_selector.dart @@ -141,7 +141,7 @@ class GitHostSetupRepoSelectorState extends State { border: const OutlineInputBorder(), suffixIcon: IconButton( onPressed: () => _textController.clear(), - icon: Icon(Icons.clear), + icon: const Icon(Icons.clear), ), ), ); diff --git a/lib/widgets/app_drawer.dart b/lib/widgets/app_drawer.dart index 274fa3f8..eccb8cdd 100644 --- a/lib/widgets/app_drawer.dart +++ b/lib/widgets/app_drawer.dart @@ -27,7 +27,7 @@ class AppDrawer extends StatelessWidget { setupGitButton = ListTile( leading: Icon(Icons.sync, color: textStyle.color), title: Text('Setup Git Host', style: textStyle), - trailing: Icon( + trailing: const Icon( Icons.info, color: Colors.red, ), diff --git a/lib/widgets/icon_dismissable.dart b/lib/widgets/icon_dismissable.dart index 4e3305fd..c1f6e54f 100644 --- a/lib/widgets/icon_dismissable.dart +++ b/lib/widgets/icon_dismissable.dart @@ -18,8 +18,8 @@ class IconDismissable extends Dismissible { background: Container( color: backgroundColor, alignment: AlignmentDirectional.centerStart, - child: Padding( - padding: const EdgeInsets.fromLTRB(16.0, 0.0, 0.0, 0.0), + child: const Padding( + padding: EdgeInsets.fromLTRB(16.0, 0.0, 0.0, 0.0), child: Icon( Icons.delete, color: Colors.white, @@ -29,8 +29,8 @@ class IconDismissable extends Dismissible { secondaryBackground: Container( color: backgroundColor, alignment: AlignmentDirectional.centerEnd, - child: Padding( - padding: const EdgeInsets.fromLTRB(0.0, 0.0, 16.0, 0.0), + child: const Padding( + padding: EdgeInsets.fromLTRB(0.0, 0.0, 16.0, 0.0), child: Icon( Icons.delete, color: Colors.white, diff --git a/lib/widgets/note_search_delegate.dart b/lib/widgets/note_search_delegate.dart index 1eb4eed8..0596cf04 100644 --- a/lib/widgets/note_search_delegate.dart +++ b/lib/widgets/note_search_delegate.dart @@ -30,7 +30,7 @@ class NoteSearchDelegate extends SearchDelegate { List buildActions(BuildContext context) { return [ IconButton( - icon: Icon(Icons.close), + icon: const Icon(Icons.close), onPressed: () { if (query.isEmpty) { close(context, null); diff --git a/lib/widgets/purchase_widget.dart b/lib/widgets/purchase_widget.dart index 7e823775..3c02904f 100644 --- a/lib/widgets/purchase_widget.dart +++ b/lib/widgets/purchase_widget.dart @@ -202,7 +202,7 @@ class _PurchaseWidgetState extends State { Row( children: [ _PurchaseSliderButton( - icon: Icon(Icons.arrow_left), + icon: const Icon(Icons.arrow_left), onPressed: () { setState(() { _selectedOffering = _prevOffering(); @@ -211,7 +211,7 @@ class _PurchaseWidgetState extends State { ), Expanded(child: slider), _PurchaseSliderButton( - icon: Icon(Icons.arrow_right), + icon: const Icon(Icons.arrow_right), onPressed: () { setState(() { _selectedOffering = _nextOffering(); diff --git a/lib/widgets/sync_button.dart b/lib/widgets/sync_button.dart index 7ad023d7..aa221392 100644 --- a/lib/widgets/sync_button.dart +++ b/lib/widgets/sync_button.dart @@ -44,7 +44,7 @@ class _SyncButtonState extends State { if (_connectivity == ConnectivityResult.none) { return GitPendingChangesBadge( child: IconButton( - icon: Icon(Icons.signal_wifi_off), + icon: const Icon(Icons.signal_wifi_off), onPressed: () async { _syncRepo(); }, @@ -55,7 +55,7 @@ class _SyncButtonState extends State { return BlinkingIcon( child: GitPendingChangesBadge( child: IconButton( - icon: Icon(Icons.cloud_download), + icon: const Icon(Icons.cloud_download), onPressed: () {}, ), ), @@ -66,7 +66,7 @@ class _SyncButtonState extends State { return BlinkingIcon( child: GitPendingChangesBadge( child: IconButton( - icon: Icon(Icons.cloud_upload), + icon: const Icon(Icons.cloud_upload), onPressed: () {}, ), ),