Fix some new lint warnings

This commit is contained in:
Ming Ming 2024-05-21 23:41:44 +08:00
parent 302cc3938e
commit ba2c69311b
5 changed files with 10 additions and 12 deletions

View file

@ -44,8 +44,8 @@ class _SignInState extends State<SignIn> {
Widget _buildContent(BuildContext context) {
if (_isConnecting) {
return Stack(
children: const [
return const Stack(
children: [
Positioned(
left: 0,
right: 0,

View file

@ -107,10 +107,10 @@ class _WrappedExportCollectionDialogState
key: _formKey,
child: Container(
constraints: const BoxConstraints.tightFor(width: 280),
child: Column(
child: const Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.start,
children: const [
children: [
_NameTextField(),
_ProviderDropdown(),
SizedBox(height: 8),

View file

@ -191,8 +191,7 @@ class _WrappedHomeCollectionsState extends State<_WrappedHomeCollections>
childBorderRadius: BorderRadius.zero,
indicatorAlignment: const Alignment(-.92, -.92),
items: state.transformedItems,
itemBuilder: (_, __, metadata) {
final item = metadata as _Item;
itemBuilder: (_, __, item) {
return _BlocSelector<int?>(
selector: (state) =>
state.itemCounts[item.collection.id],
@ -209,8 +208,7 @@ class _WrappedHomeCollectionsState extends State<_WrappedHomeCollections>
onSelectionChange: (_, selected) {
_bloc.add(_SetSelectedItems(items: selected.cast()));
},
onItemTap: (context, _, metadata) {
final item = metadata as _Item;
onItemTap: (context, _, item) {
Navigator.of(context).pushNamed(
CollectionBrowser.routeName,
arguments:

View file

@ -117,10 +117,10 @@ class _WrappedNewCollectionDialogState
key: _formKey,
child: Container(
constraints: const BoxConstraints.tightFor(width: 280),
child: Column(
child: const Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.start,
children: const [
children: [
_NameTextField(),
_ProviderDropdown(),
SizedBox(height: 8),

View file

@ -62,8 +62,8 @@ class _SignInState extends State<SignIn> {
Widget _buildContent(BuildContext context) {
if (_isConnecting) {
return Stack(
children: const [
return const Stack(
children: [
Positioned(
left: 0,
right: 0,