mirror of
https://github.com/GitJournal/GitJournal.git
synced 2025-06-29 18:38:36 +08:00
const++
This commit is contained in:
@ -367,7 +367,11 @@ class _ChecklistItemTileState extends State<ChecklistItemTile> {
|
|||||||
dense: true,
|
dense: true,
|
||||||
leading: Row(
|
leading: Row(
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
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),
|
const SizedBox(width: 8.0),
|
||||||
SizedBox(
|
SizedBox(
|
||||||
height: 24.0,
|
height: 24.0,
|
||||||
|
@ -43,7 +43,7 @@ class EditorAppBar extends StatelessWidget implements PreferredSizeWidget {
|
|||||||
@required this.editorState,
|
@required this.editorState,
|
||||||
@required this.noteModified,
|
@required this.noteModified,
|
||||||
this.extraButton,
|
this.extraButton,
|
||||||
}) : preferredSize = Size.fromHeight(kToolbarHeight),
|
}) : preferredSize = const Size.fromHeight(kToolbarHeight),
|
||||||
super(key: key);
|
super(key: key);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@ -97,7 +97,7 @@ class EditorBottomBar extends StatelessWidget {
|
|||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
var addIcon = IconButton(
|
var addIcon = IconButton(
|
||||||
icon: Icon(Icons.attach_file),
|
icon: const Icon(Icons.attach_file),
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
showModalBottomSheet(
|
showModalBottomSheet(
|
||||||
context: context,
|
context: context,
|
||||||
@ -108,7 +108,7 @@ class EditorBottomBar extends StatelessWidget {
|
|||||||
);
|
);
|
||||||
|
|
||||||
var menuIcon = IconButton(
|
var menuIcon = IconButton(
|
||||||
icon: Icon(Icons.more_vert),
|
icon: const Icon(Icons.more_vert),
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
showModalBottomSheet(
|
showModalBottomSheet(
|
||||||
context: context,
|
context: context,
|
||||||
@ -133,7 +133,7 @@ class EditorBottomBar extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
Expanded(
|
Expanded(
|
||||||
child: FlatButton.icon(
|
child: FlatButton.icon(
|
||||||
icon: Icon(Icons.folder),
|
icon: const Icon(Icons.folder),
|
||||||
label: Text(parentFolder.publicName),
|
label: Text(parentFolder.publicName),
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
var note = editorState.getNote();
|
var note = editorState.getNote();
|
||||||
@ -159,7 +159,7 @@ Widget _buildAddBottomSheet(
|
|||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
ListTile(
|
ListTile(
|
||||||
leading: Icon(Icons.camera),
|
leading: const Icon(Icons.camera),
|
||||||
title: Text(tr('editors.common.takePhoto')),
|
title: Text(tr('editors.common.takePhoto')),
|
||||||
onTap: () async {
|
onTap: () async {
|
||||||
try {
|
try {
|
||||||
@ -177,7 +177,7 @@ Widget _buildAddBottomSheet(
|
|||||||
},
|
},
|
||||||
),
|
),
|
||||||
ListTile(
|
ListTile(
|
||||||
leading: Icon(Icons.image),
|
leading: const Icon(Icons.image),
|
||||||
title: Text(tr('editors.common.addImage')),
|
title: Text(tr('editors.common.addImage')),
|
||||||
onTap: () async {
|
onTap: () async {
|
||||||
try {
|
try {
|
||||||
@ -213,7 +213,7 @@ Widget _buildBottomMenuSheet(
|
|||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
ListTile(
|
ListTile(
|
||||||
leading: Icon(Icons.undo),
|
leading: const Icon(Icons.undo),
|
||||||
title: Text(tr('editors.common.discard')),
|
title: Text(tr('editors.common.discard')),
|
||||||
onTap: () {
|
onTap: () {
|
||||||
var note = editorState.getNote();
|
var note = editorState.getNote();
|
||||||
@ -224,7 +224,7 @@ Widget _buildBottomMenuSheet(
|
|||||||
enabled: editorState.noteModified,
|
enabled: editorState.noteModified,
|
||||||
),
|
),
|
||||||
ListTile(
|
ListTile(
|
||||||
leading: Icon(Icons.share),
|
leading: const Icon(Icons.share),
|
||||||
title: Text(tr('editors.common.share')),
|
title: Text(tr('editors.common.share')),
|
||||||
onTap: () {
|
onTap: () {
|
||||||
var note = editorState.getNote();
|
var note = editorState.getNote();
|
||||||
|
@ -108,7 +108,7 @@ class FileSystemView extends StatelessWidget {
|
|||||||
|
|
||||||
Widget _buildFolderTile(NotesFolderFS folder) {
|
Widget _buildFolderTile(NotesFolderFS folder) {
|
||||||
return ListTile(
|
return ListTile(
|
||||||
leading: Icon(Icons.folder),
|
leading: const Icon(Icons.folder),
|
||||||
title: Text(folder.name),
|
title: Text(folder.name),
|
||||||
dense: true,
|
dense: true,
|
||||||
onTap: () => onFolderSelected(folder),
|
onTap: () => onFolderSelected(folder),
|
||||||
@ -117,7 +117,7 @@ class FileSystemView extends StatelessWidget {
|
|||||||
|
|
||||||
Widget _buildNoteTile(Note note) {
|
Widget _buildNoteTile(Note note) {
|
||||||
return ListTile(
|
return ListTile(
|
||||||
leading: Icon(Icons.note),
|
leading: const Icon(Icons.note),
|
||||||
title: Text(note.fileName),
|
title: Text(note.fileName),
|
||||||
dense: true,
|
dense: true,
|
||||||
onTap: () => onNoteSelected(note),
|
onTap: () => onNoteSelected(note),
|
||||||
@ -127,7 +127,7 @@ class FileSystemView extends StatelessWidget {
|
|||||||
Widget _buildIgnoredFileTile(IgnoredFile ignoredFile) {
|
Widget _buildIgnoredFileTile(IgnoredFile ignoredFile) {
|
||||||
// FIXME: Paint with Ignored colours
|
// FIXME: Paint with Ignored colours
|
||||||
return ListTile(
|
return ListTile(
|
||||||
leading: Icon(Icons.broken_image),
|
leading: const Icon(Icons.broken_image),
|
||||||
title: Text(ignoredFile.fileName),
|
title: Text(ignoredFile.fileName),
|
||||||
dense: true,
|
dense: true,
|
||||||
enabled: true,
|
enabled: true,
|
||||||
|
@ -132,7 +132,7 @@ class _FolderViewState extends State<FolderView> {
|
|||||||
),
|
),
|
||||||
if (appState.remoteGitRepoConfigured) SyncButton(),
|
if (appState.remoteGitRepoConfigured) SyncButton(),
|
||||||
IconButton(
|
IconButton(
|
||||||
icon: Icon(Icons.search),
|
icon: const Icon(Icons.search),
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
showSearch(
|
showSearch(
|
||||||
context: context,
|
context: context,
|
||||||
|
@ -66,7 +66,7 @@ class SettingsListState extends State<SettingsList> {
|
|||||||
key: gitAuthorKey,
|
key: gitAuthorKey,
|
||||||
style: Theme.of(context).textTheme.headline6,
|
style: Theme.of(context).textTheme.headline6,
|
||||||
decoration: InputDecoration(
|
decoration: InputDecoration(
|
||||||
icon: Icon(Icons.person),
|
icon: const Icon(Icons.person),
|
||||||
hintText: tr('settings.author.hint'),
|
hintText: tr('settings.author.hint'),
|
||||||
labelText: tr('settings.author.label'),
|
labelText: tr('settings.author.label'),
|
||||||
),
|
),
|
||||||
@ -99,7 +99,7 @@ class SettingsListState extends State<SettingsList> {
|
|||||||
style: Theme.of(context).textTheme.headline6,
|
style: Theme.of(context).textTheme.headline6,
|
||||||
keyboardType: TextInputType.emailAddress,
|
keyboardType: TextInputType.emailAddress,
|
||||||
decoration: InputDecoration(
|
decoration: InputDecoration(
|
||||||
icon: Icon(Icons.email),
|
icon: const Icon(Icons.email),
|
||||||
hintText: tr('settings.email.hint'),
|
hintText: tr('settings.email.hint'),
|
||||||
labelText: tr('settings.email.label'),
|
labelText: tr('settings.email.label'),
|
||||||
),
|
),
|
||||||
|
@ -141,7 +141,7 @@ class GitHostSetupRepoSelectorState extends State<GitHostSetupRepoSelector> {
|
|||||||
border: const OutlineInputBorder(),
|
border: const OutlineInputBorder(),
|
||||||
suffixIcon: IconButton(
|
suffixIcon: IconButton(
|
||||||
onPressed: () => _textController.clear(),
|
onPressed: () => _textController.clear(),
|
||||||
icon: Icon(Icons.clear),
|
icon: const Icon(Icons.clear),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
@ -27,7 +27,7 @@ class AppDrawer extends StatelessWidget {
|
|||||||
setupGitButton = ListTile(
|
setupGitButton = ListTile(
|
||||||
leading: Icon(Icons.sync, color: textStyle.color),
|
leading: Icon(Icons.sync, color: textStyle.color),
|
||||||
title: Text('Setup Git Host', style: textStyle),
|
title: Text('Setup Git Host', style: textStyle),
|
||||||
trailing: Icon(
|
trailing: const Icon(
|
||||||
Icons.info,
|
Icons.info,
|
||||||
color: Colors.red,
|
color: Colors.red,
|
||||||
),
|
),
|
||||||
|
@ -18,8 +18,8 @@ class IconDismissable extends Dismissible {
|
|||||||
background: Container(
|
background: Container(
|
||||||
color: backgroundColor,
|
color: backgroundColor,
|
||||||
alignment: AlignmentDirectional.centerStart,
|
alignment: AlignmentDirectional.centerStart,
|
||||||
child: Padding(
|
child: const Padding(
|
||||||
padding: const EdgeInsets.fromLTRB(16.0, 0.0, 0.0, 0.0),
|
padding: EdgeInsets.fromLTRB(16.0, 0.0, 0.0, 0.0),
|
||||||
child: Icon(
|
child: Icon(
|
||||||
Icons.delete,
|
Icons.delete,
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
@ -29,8 +29,8 @@ class IconDismissable extends Dismissible {
|
|||||||
secondaryBackground: Container(
|
secondaryBackground: Container(
|
||||||
color: backgroundColor,
|
color: backgroundColor,
|
||||||
alignment: AlignmentDirectional.centerEnd,
|
alignment: AlignmentDirectional.centerEnd,
|
||||||
child: Padding(
|
child: const Padding(
|
||||||
padding: const EdgeInsets.fromLTRB(0.0, 0.0, 16.0, 0.0),
|
padding: EdgeInsets.fromLTRB(0.0, 0.0, 16.0, 0.0),
|
||||||
child: Icon(
|
child: Icon(
|
||||||
Icons.delete,
|
Icons.delete,
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
|
@ -30,7 +30,7 @@ class NoteSearchDelegate extends SearchDelegate<Note> {
|
|||||||
List<Widget> buildActions(BuildContext context) {
|
List<Widget> buildActions(BuildContext context) {
|
||||||
return [
|
return [
|
||||||
IconButton(
|
IconButton(
|
||||||
icon: Icon(Icons.close),
|
icon: const Icon(Icons.close),
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
if (query.isEmpty) {
|
if (query.isEmpty) {
|
||||||
close(context, null);
|
close(context, null);
|
||||||
|
@ -202,7 +202,7 @@ class _PurchaseWidgetState extends State<PurchaseWidget> {
|
|||||||
Row(
|
Row(
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
_PurchaseSliderButton(
|
_PurchaseSliderButton(
|
||||||
icon: Icon(Icons.arrow_left),
|
icon: const Icon(Icons.arrow_left),
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
setState(() {
|
setState(() {
|
||||||
_selectedOffering = _prevOffering();
|
_selectedOffering = _prevOffering();
|
||||||
@ -211,7 +211,7 @@ class _PurchaseWidgetState extends State<PurchaseWidget> {
|
|||||||
),
|
),
|
||||||
Expanded(child: slider),
|
Expanded(child: slider),
|
||||||
_PurchaseSliderButton(
|
_PurchaseSliderButton(
|
||||||
icon: Icon(Icons.arrow_right),
|
icon: const Icon(Icons.arrow_right),
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
setState(() {
|
setState(() {
|
||||||
_selectedOffering = _nextOffering();
|
_selectedOffering = _nextOffering();
|
||||||
|
@ -44,7 +44,7 @@ class _SyncButtonState extends State<SyncButton> {
|
|||||||
if (_connectivity == ConnectivityResult.none) {
|
if (_connectivity == ConnectivityResult.none) {
|
||||||
return GitPendingChangesBadge(
|
return GitPendingChangesBadge(
|
||||||
child: IconButton(
|
child: IconButton(
|
||||||
icon: Icon(Icons.signal_wifi_off),
|
icon: const Icon(Icons.signal_wifi_off),
|
||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
_syncRepo();
|
_syncRepo();
|
||||||
},
|
},
|
||||||
@ -55,7 +55,7 @@ class _SyncButtonState extends State<SyncButton> {
|
|||||||
return BlinkingIcon(
|
return BlinkingIcon(
|
||||||
child: GitPendingChangesBadge(
|
child: GitPendingChangesBadge(
|
||||||
child: IconButton(
|
child: IconButton(
|
||||||
icon: Icon(Icons.cloud_download),
|
icon: const Icon(Icons.cloud_download),
|
||||||
onPressed: () {},
|
onPressed: () {},
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@ -66,7 +66,7 @@ class _SyncButtonState extends State<SyncButton> {
|
|||||||
return BlinkingIcon(
|
return BlinkingIcon(
|
||||||
child: GitPendingChangesBadge(
|
child: GitPendingChangesBadge(
|
||||||
child: IconButton(
|
child: IconButton(
|
||||||
icon: Icon(Icons.cloud_upload),
|
icon: const Icon(Icons.cloud_upload),
|
||||||
onPressed: () {},
|
onPressed: () {},
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
Reference in New Issue
Block a user