Skip to content

Commit

Permalink
chore: Update to use the latest lint rules (#62)
Browse files Browse the repository at this point in the history
  • Loading branch information
thelukewalton authored Jan 22, 2025
1 parent 996ddca commit 7d52932
Show file tree
Hide file tree
Showing 11 changed files with 14 additions and 12 deletions.
3 changes: 2 additions & 1 deletion analysis_options.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
include: package:zds_analysis/analysis_options_lib.yaml
linter:
rules:
use_build_context_synchronously: false
use_build_context_synchronously: false
document_ignores: false
2 changes: 1 addition & 1 deletion lib/src/components/atoms/border_clipper.dart
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import 'package:flutter/material.dart';
/// If any of the insets (parameters) change, the clipping area will be recalculated.
///
/// # Example
/// ```
/// ```dart
/// ZdsBorderClipper clipper = ZdsBorderClipper(
/// top: 10,
/// bottom: 10,
Expand Down
1 change: 0 additions & 1 deletion lib/src/components/atoms/shake_animation.dart
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ class ZdsShakeAnimation extends StatefulWidget {
final Widget child;

/// Horizontal shake offset
/// ...<- [Widget] ->...
final double shakeOffset;

/// No of repetitions.
Expand Down
2 changes: 1 addition & 1 deletion lib/src/components/molecules/date_range_picker.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2050,7 +2050,7 @@ class _DayHeaders extends StatelessWidget {
///
/// Examples:
///
/// ```
/// ```none
/// ┌ [firsDayOfWeek] is 0 then its point to Sunday which is the first day of week in the US (en_US)
/// |
/// S M T W T F S <-- the returned list contains these widgets
Expand Down
1 change: 1 addition & 0 deletions lib/src/components/molecules/interval_time_picker.dart
Original file line number Diff line number Diff line change
Expand Up @@ -799,6 +799,7 @@ class _RenderInputPadding extends RenderShiftedBox {
);
if (child != null) {
final BoxParentData childParentData = child!.parentData! as BoxParentData;
// Ignored as we need to set the offset whilst keeping childParentData as its own object.
// ignore: cascade_invocations
childParentData.offset = Alignment.center.alongOffset(size - child!.size as Offset);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/// Material Color Picker
library material_colorpicker;
library;

import 'package:flutter/foundation.dart';
import 'package:flutter/gestures.dart';
Expand Down
1 change: 1 addition & 0 deletions lib/src/utils/assets/icons.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// Ignored as to not break other packages using this file.
// ignore_for_file: constant_identifier_names, public_member_api_docs

// To add new icons, follow the instructions in https://confluence.zebra.com/display/IDD/Internal+developer+resources
Expand Down
4 changes: 2 additions & 2 deletions lib/src/utils/theme/theme_data.dart
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@ class ZdsThemeData {
///
/// [path] is the location of the JSON file.
///
/// Returns a Future that completes with a Map<String, dynamic> once the file has been loaded and decoded.
/// Returns a Future that completes with a Map once the file has been loaded and decoded.
/// If an error occurs during loading or decoding, it catches the exception and returns an empty Map.
static Future<String> _readAsset(String path) async {
try {
Expand All @@ -385,7 +385,7 @@ class ZdsThemeData {

/// Parses a JSON string and returns it as a Map.
///
/// The [jsonString] argument is a JSON string that will be parsed into a Map<String, dynamic>.
/// The [jsonString] argument is a JSON string that will be parsed into a Map.
///
/// This method tries to decode the given JSON string. If an error occurs during decoding,
/// it catches the exception and returns an empty Map.
Expand Down
2 changes: 1 addition & 1 deletion lib/src/utils/tools/modifiers.dart
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,7 @@ extension RowLayout on Row {
/// Center aligning row's children perfectly on the horizontal AND on the vertical axis
/// when used in a vertical MultichildRenderObject.
///
/// ```
/// ```none
/// e.g. normal Column or ListView with rows inside
/// 750000 187
/// 245000 14501
Expand Down
6 changes: 3 additions & 3 deletions lib/src/utils/tools/tab_navigator.dart
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ class ZdsSplitNavigator extends StatefulWidget {
/// If no [ZdsSplitNavigatorState] ancestor is found, a [FlutterError] is thrown.
///
/// Usage:
/// ```
/// ```dart
/// final ZdsSplitNavigatorState = ZdsSplitNavigatorState.of(context);
/// ```
///
Expand Down Expand Up @@ -238,10 +238,10 @@ class ZdsSplitNavigatorState extends State<ZdsSplitNavigator> with FrameCallback
/// An integer value to keep track of the number of routes in the nested navigator.
int routesCount = 0;

/// A GlobalKey<NavigatorState> used to access the nested navigator's state.
/// A GlobalKey used to access the nested navigator's state.
late GlobalKey<NavigatorState> navigatorKey;

/// A ValueNotifier<String> that holds the current route's name. By default, it is initialized
/// A ValueNotifier that holds the current route's name. By default, it is initialized
/// with ZdsSplitNavigator.emptyRoute.
final ValueNotifier<String> currentRoute = ValueNotifier<String>(ZdsSplitNavigator.emptyRoute);

Expand Down
2 changes: 1 addition & 1 deletion lib/zds_flutter.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/// A library of Flutter components made by Zebra Technologies based on the Zebra Design System, or ZDS.
library zds_flutter;
library;

export 'package:zeta_flutter/zeta_flutter.dart' hide DeviceType, ListDivider;

Expand Down

0 comments on commit 7d52932

Please sign in to comment.