1
0
mirror of https://github.com/flutter/samples.git synced 2025-11-08 13:58:47 +00:00

Enable some extra lints for compass app client (#2560)

Enable a few more lints that were mostly followed already for
consistency.
This commit is contained in:
Parker Lougheed
2025-01-06 21:58:52 +08:00
committed by GitHub
parent e36c642199
commit e39638ebff
31 changed files with 65 additions and 52 deletions

View File

@@ -29,8 +29,8 @@ abstract final class Dimens {
EdgeInsets get edgeInsetsScreenSymmetric => EdgeInsets.symmetric(
horizontal: paddingScreenHorizontal, vertical: paddingScreenVertical);
static final Dimens desktop = _DimensDesktop();
static final Dimens mobile = _DimensMobile();
static const Dimens desktop = _DimensDesktop();
static const Dimens mobile = _DimensMobile();
/// Get dimensions definition based on screen size
factory Dimens.of(BuildContext context) =>
@@ -50,6 +50,8 @@ final class _DimensMobile extends Dimens {
@override
final double profilePictureSize = 64.0;
const _DimensMobile();
}
/// Desktop/Web dimensions
@@ -62,4 +64,6 @@ final class _DimensDesktop extends Dimens {
@override
final double profilePictureSize = 128.0;
const _DimensDesktop();
}

View File

@@ -2,10 +2,11 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'colors.dart';
import '../ui/tag_chip.dart';
import 'package:flutter/material.dart';
import '../ui/tag_chip.dart';
import 'colors.dart';
abstract final class AppTheme {
static const _textTheme = TextTheme(
headlineLarge: TextStyle(

View File

@@ -80,7 +80,9 @@ class _QueryText extends StatelessWidget {
}
return Text(
'$continent - ${dateFormatStartEnd(DateTimeRange(start: startDate, end: endDate))} - Guests: $guests',
'$continent - '
'${dateFormatStartEnd(DateTimeRange(start: startDate, end: endDate))} - '
'Guests: $guests',
textAlign: TextAlign.center,
style: Theme.of(context).textTheme.bodyLarge,
);

View File

@@ -4,10 +4,11 @@
import 'dart:ui';
import '../themes/colors.dart';
import 'package:flutter/material.dart';
import 'package:google_fonts/google_fonts.dart';
import '../themes/colors.dart';
class TagChip extends StatelessWidget {
const TagChip({
super.key,
@@ -96,7 +97,7 @@ class TagChip extends StatelessWidget {
// Note: original Figma file uses Google Sans
// which is not available on GoogleFonts
_textStyle(BuildContext context) => GoogleFonts.openSans(
TextStyle _textStyle(BuildContext context) => GoogleFonts.openSans(
textStyle: TextStyle(
fontWeight: FontWeight.w500,
fontSize: fontSize,