upgrade min sdk; run formatter
This commit is contained in:
@@ -11,26 +11,25 @@ class AuthorsHorizontalList extends StatelessWidget {
|
||||
Set<String> selectedTags = const {},
|
||||
void Function(String tagId, bool value)? onTagSelected,
|
||||
}) {
|
||||
_authors =
|
||||
authors.map((author) {
|
||||
final label = Text(
|
||||
'${author.name ?? ''} ${author.email.mapNotNull((email) => '($email)') ?? ''}'
|
||||
.trim(),
|
||||
);
|
||||
_authors = authors.map((author) {
|
||||
final label = Text(
|
||||
'${author.name ?? ''} ${author.email.mapNotNull((email) => '($email)') ?? ''}'
|
||||
.trim(),
|
||||
);
|
||||
|
||||
return onTagSelected.mapNotNull(
|
||||
(onTagSelected) => FilterChip(
|
||||
label: label,
|
||||
selected: selectedTags.contains(author.name),
|
||||
onSelected: (value) {
|
||||
if (author.name.isNotEmpty) {
|
||||
onTagSelected(author.name!, value);
|
||||
}
|
||||
},
|
||||
),
|
||||
) ??
|
||||
Chip(label: label);
|
||||
}).toList();
|
||||
return onTagSelected.mapNotNull(
|
||||
(onTagSelected) => FilterChip(
|
||||
label: label,
|
||||
selected: selectedTags.contains(author.name),
|
||||
onSelected: (value) {
|
||||
if (author.name.isNotEmpty) {
|
||||
onTagSelected(author.name!, value);
|
||||
}
|
||||
},
|
||||
),
|
||||
) ??
|
||||
Chip(label: label);
|
||||
}).toList();
|
||||
}
|
||||
|
||||
@override
|
||||
|
||||
@@ -70,11 +70,12 @@ class FeedArticleCard extends HookConsumerWidget {
|
||||
MarkdownBody(
|
||||
data: titleHighlight!,
|
||||
styleSheet: MarkdownStyleSheet(
|
||||
p: Theme.of(
|
||||
context,
|
||||
).textTheme.titleMedium?.copyWith(
|
||||
color: Theme.of(context).colorScheme.onSurface,
|
||||
),
|
||||
p: Theme.of(context).textTheme.titleMedium
|
||||
?.copyWith(
|
||||
color: Theme.of(
|
||||
context,
|
||||
).colorScheme.onSurface,
|
||||
),
|
||||
),
|
||||
),
|
||||
if (titleHighlight.isEmpty)
|
||||
@@ -86,23 +87,19 @@ class FeedArticleCard extends HookConsumerWidget {
|
||||
MarkdownBody(
|
||||
data: searchSnippet!,
|
||||
styleSheet: MarkdownStyleSheet(
|
||||
p: Theme.of(
|
||||
context,
|
||||
).textTheme.bodyMedium?.copyWith(
|
||||
color:
|
||||
Theme.of(
|
||||
p: Theme.of(context).textTheme.bodyMedium
|
||||
?.copyWith(
|
||||
color: Theme.of(
|
||||
context,
|
||||
).colorScheme.onSurfaceVariant,
|
||||
),
|
||||
a: Theme.of(
|
||||
context,
|
||||
).textTheme.bodyMedium?.copyWith(
|
||||
color:
|
||||
Theme.of(
|
||||
),
|
||||
a: Theme.of(context).textTheme.bodyMedium
|
||||
?.copyWith(
|
||||
color: Theme.of(
|
||||
context,
|
||||
).colorScheme.onSurfaceVariant,
|
||||
decoration: TextDecoration.none,
|
||||
),
|
||||
decoration: TextDecoration.none,
|
||||
),
|
||||
),
|
||||
),
|
||||
if (searchSnippet.isEmpty &&
|
||||
|
||||
@@ -108,16 +108,18 @@ class FeedCard extends HookConsumerWidget {
|
||||
Icon(
|
||||
MdiIcons.newspaperVariantMultipleOutline,
|
||||
size: 18,
|
||||
color:
|
||||
Theme.of(context).colorScheme.onPrimary,
|
||||
color: Theme.of(
|
||||
context,
|
||||
).colorScheme.onPrimary,
|
||||
),
|
||||
const SizedBox(width: 4),
|
||||
Text(
|
||||
count.toString(),
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
color:
|
||||
Theme.of(context).colorScheme.onPrimary,
|
||||
color: Theme.of(
|
||||
context,
|
||||
).colorScheme.onPrimary,
|
||||
),
|
||||
),
|
||||
],
|
||||
|
||||
@@ -31,17 +31,16 @@ class TagField extends HookWidget {
|
||||
const SizedBox(height: 4),
|
||||
Wrap(
|
||||
spacing: 8.0,
|
||||
children:
|
||||
tags.value
|
||||
.map(
|
||||
(tag) => InputChip(
|
||||
label: Text(tag),
|
||||
onDeleted: () {
|
||||
tags.value = {...tags.value}..remove(tag);
|
||||
},
|
||||
),
|
||||
)
|
||||
.toList(),
|
||||
children: tags.value
|
||||
.map(
|
||||
(tag) => InputChip(
|
||||
label: Text(tag),
|
||||
onDeleted: () {
|
||||
tags.value = {...tags.value}..remove(tag);
|
||||
},
|
||||
),
|
||||
)
|
||||
.toList(),
|
||||
),
|
||||
TextField(
|
||||
controller: textController,
|
||||
@@ -68,12 +67,11 @@ class TagField extends HookWidget {
|
||||
},
|
||||
onSubmitted: (value) {
|
||||
if (value.isNotEmpty) {
|
||||
final values =
|
||||
value
|
||||
.split(_tagSplitPatter)
|
||||
.map((str) => str.trim())
|
||||
.where((str) => str.isNotEmpty)
|
||||
.toList();
|
||||
final values = value
|
||||
.split(_tagSplitPatter)
|
||||
.map((str) => str.trim())
|
||||
.where((str) => str.isNotEmpty)
|
||||
.toList();
|
||||
|
||||
if (values.isNotEmpty) {
|
||||
textController.clear();
|
||||
|
||||
@@ -11,28 +11,26 @@ class TagsHorizontalList extends StatelessWidget {
|
||||
Set<String> selectedTags = const {},
|
||||
void Function(String tagId, bool value)? onTagSelected,
|
||||
}) {
|
||||
_tags =
|
||||
tags.map((tag) {
|
||||
final label = Text(
|
||||
'${tag.id} ${tag.title.mapNotNull((title) => '($title)') ?? ''}'
|
||||
.trim(),
|
||||
);
|
||||
_tags = tags.map((tag) {
|
||||
final label = Text(
|
||||
'${tag.id} ${tag.title.mapNotNull((title) => '($title)') ?? ''}'.trim(),
|
||||
);
|
||||
|
||||
return Padding(
|
||||
padding: const EdgeInsets.only(right: 8.0),
|
||||
child:
|
||||
onTagSelected.mapNotNull(
|
||||
(onTagSelected) => FilterChip(
|
||||
label: label,
|
||||
selected: selectedTags.contains(tag.id),
|
||||
onSelected: (value) {
|
||||
onTagSelected(tag.id, value);
|
||||
},
|
||||
),
|
||||
) ??
|
||||
Chip(label: label),
|
||||
);
|
||||
}).toList();
|
||||
return Padding(
|
||||
padding: const EdgeInsets.only(right: 8.0),
|
||||
child:
|
||||
onTagSelected.mapNotNull(
|
||||
(onTagSelected) => FilterChip(
|
||||
label: label,
|
||||
selected: selectedTags.contains(tag.id),
|
||||
onSelected: (value) {
|
||||
onTagSelected(tag.id, value);
|
||||
},
|
||||
),
|
||||
) ??
|
||||
Chip(label: label),
|
||||
);
|
||||
}).toList();
|
||||
}
|
||||
|
||||
@override
|
||||
|
||||
Reference in New Issue
Block a user