Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .fvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"flutter": "3.32.2"
}
2 changes: 1 addition & 1 deletion .github/workflows/on-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
with:
cache: true
channel: stable
flutter-version: 3.24.x # TODO UX-1347
flutter-version: 3.32.x
- name: Setup flutter
run: flutter pub get
- name: Lint and format
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/on-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
with:
cache: true
channel: stable
flutter-version: 3.24.x # TODO UX-1347
flutter-version: 3.32.x
- name: Install dependencies
run: flutter pub get
- name: Format code
Expand All @@ -38,7 +38,7 @@ jobs:
with:
cache: true
channel: stable
flutter-version: 3.24.x # TODO UX-1347
flutter-version: 3.32.x
- name: Setup flutter
run: flutter pub get
- name: Build example app
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
with:
cache: true
channel: stable
flutter-version: 3.32.x # TODO UX-1347
flutter-version: 3.32.x
- uses: ZebraDevs/flutter-code-quality@main
with:
token: ${{secrets.GITHUB_TOKEN}}
Expand Down Expand Up @@ -54,7 +54,7 @@ jobs:
with:
cache: true
channel: stable
flutter-version: 3.32.x # TODO UX-1347
flutter-version: 3.32.x
- name: Setup flutter
run: flutter pub get
- name: Build example app
Expand Down
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -77,4 +77,8 @@ pubspec.lock
**/node_modules
.master/
**/.fvm/
.fvmrc
example/ios/Flutter/ephemeral/flutter_lldb_helper.py
example/ios/Flutter/ephemeral/flutter_lldbinit

# FVM Version Cache
.fvm/
3 changes: 3 additions & 0 deletions analysis_options.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
analyzer:
errors:
unsafe_variance: ignore
include: package:zds_analysis/analysis_options_lib.yaml
linter:
rules:
Expand Down
2 changes: 2 additions & 0 deletions example/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,11 @@
*.swp
.DS_Store
.atom/
.build/
.buildlog/
.history
.svn/
.swiftpm/
migrate_working_dir/

# IntelliJ related
Expand Down
2 changes: 1 addition & 1 deletion example/lib/pages/components/expansion_tile.dart
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ class _ExpansionTileDemoState extends State<ExpansionTileDemo> {
ZdsExpansionTile(
title: const Text('Collect feedback from customers who was'),
initiallyExpanded: true,
titleColor: const Color(0xff007ABA).withOpacity(0.1),
titleColor: const Color(0xff007ABA).withValues(alpha: 0.1),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Expand Down
4 changes: 2 additions & 2 deletions example/macos/Flutter/GeneratedPluginRegistrant.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import open_file_mac
import package_info_plus
import path_provider_foundation
import quill_native_bridge_macos
import record_darwin
import record_macos
import share_plus
import shared_preferences_foundation
import sqflite_darwin
Expand All @@ -42,7 +42,7 @@ func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
FPPPackageInfoPlusPlugin.register(with: registry.registrar(forPlugin: "FPPPackageInfoPlusPlugin"))
PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin"))
QuillNativeBridgePlugin.register(with: registry.registrar(forPlugin: "QuillNativeBridgePlugin"))
RecordPlugin.register(with: registry.registrar(forPlugin: "RecordPlugin"))
RecordMacOsPlugin.register(with: registry.registrar(forPlugin: "RecordMacOsPlugin"))
SharePlusMacosPlugin.register(with: registry.registrar(forPlugin: "SharePlusMacosPlugin"))
SharedPreferencesPlugin.register(with: registry.registrar(forPlugin: "SharedPreferencesPlugin"))
SqflitePlugin.register(with: registry.registrar(forPlugin: "SqflitePlugin"))
Expand Down
10 changes: 5 additions & 5 deletions example/macos/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ PODS:
- FlutterMacOS
- quill_native_bridge_macos (0.0.1):
- FlutterMacOS
- record_darwin (1.0.0):
- record_macos (1.0.0):
- FlutterMacOS
- share_plus (0.0.1):
- FlutterMacOS
Expand Down Expand Up @@ -68,7 +68,7 @@ DEPENDENCIES:
- package_info_plus (from `Flutter/ephemeral/.symlinks/plugins/package_info_plus/macos`)
- path_provider_foundation (from `Flutter/ephemeral/.symlinks/plugins/path_provider_foundation/darwin`)
- quill_native_bridge_macos (from `Flutter/ephemeral/.symlinks/plugins/quill_native_bridge_macos/macos`)
- record_darwin (from `Flutter/ephemeral/.symlinks/plugins/record_darwin/macos`)
- record_macos (from `Flutter/ephemeral/.symlinks/plugins/record_macos/macos`)
- share_plus (from `Flutter/ephemeral/.symlinks/plugins/share_plus/macos`)
- shared_preferences_foundation (from `Flutter/ephemeral/.symlinks/plugins/shared_preferences_foundation/darwin`)
- sqflite_darwin (from `Flutter/ephemeral/.symlinks/plugins/sqflite_darwin/darwin`)
Expand Down Expand Up @@ -111,8 +111,8 @@ EXTERNAL SOURCES:
:path: Flutter/ephemeral/.symlinks/plugins/path_provider_foundation/darwin
quill_native_bridge_macos:
:path: Flutter/ephemeral/.symlinks/plugins/quill_native_bridge_macos/macos
record_darwin:
:path: Flutter/ephemeral/.symlinks/plugins/record_darwin/macos
record_macos:
:path: Flutter/ephemeral/.symlinks/plugins/record_macos/macos
share_plus:
:path: Flutter/ephemeral/.symlinks/plugins/share_plus/macos
shared_preferences_foundation:
Expand Down Expand Up @@ -146,7 +146,7 @@ SPEC CHECKSUMS:
package_info_plus: 12f1c5c2cfe8727ca46cbd0b26677728972d9a5b
path_provider_foundation: 2b6b4c569c0fb62ec74538f866245ac84301af46
quill_native_bridge_macos: 3a5f378bc757eb92825193853020b759b56cbb2c
record_darwin: a0d515a0ef78c440c123ea3ac76184c9927a94d6
record_macos: 3ead198d39fad25d10163780132a96b6fd162a1c
share_plus: 1fa619de8392a4398bfaf176d441853922614e89
shared_preferences_foundation: fcdcbc04712aee1108ac7fda236f363274528f78
sqflite_darwin: 5a7236e3b501866c1c9befc6771dfd73ffb8702d
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
enableGPUValidationMode = "1"
allowLocationSimulation = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
Expand Down
4 changes: 4 additions & 0 deletions example/macos/Runner/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,8 @@ class AppDelegate: FlutterAppDelegate {
override func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool {
return true
}

override func applicationSupportsSecureRestorableState(_ app: NSApplication) -> Bool {
return true
}
}
19 changes: 8 additions & 11 deletions example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,18 @@ dependencies:
sdk: flutter
flutter_localizations:
sdk: flutter
intl: ^0.19.0
lottie: ^3.1.2
path_provider: ^2.1.2
lottie: ^3.3.1
path_provider: ^2.1.5
scrollable_positioned_list: ^0.3.8
shared_preferences: ^2.2.2
table_calendar: ^3.0.9
shared_preferences: ^2.5.3
table_calendar: ^3.2.0

dependency_overrides:
flutter_slidable: ^4.0.0
intl: ^0.19.0
Comment thread
thelukewalton marked this conversation as resolved.
zds_flutter:
path: ../

url_launcher: any
cross_file: any
zeta_flutter: any
flutter_quill: any
flutter_quill_extensions: any
image_picker: any
flutter:
uses-material-design: true
assets:
Expand Down
2 changes: 1 addition & 1 deletion lib/src/components/atoms/button.dart
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ class ZdsButton extends StatelessWidget {

// Helper function to calculate the overlay color.
Color calculateOverlay({double opacity = 0.1, Color? background}) {
return customColor?.withOpacity(opacity) ?? (background ?? defaultBackground).withOpacity(opacity);
return customColor?.withValues(alpha: opacity) ?? (background ?? defaultBackground).withValues(alpha: opacity);
}

switch (variant) {
Expand Down
4 changes: 2 additions & 2 deletions lib/src/components/atoms/expandable.dart
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ class _ExpandableContainerState extends State<_ExpandableContainer> with SingleT
super.dispose();
}

void _afterLayout(_) {
void _afterLayout(dynamic _) {
final RenderBox renderBox = _keyText.currentContext!.findRenderObject()! as RenderBox;
_textHeight = renderBox.size.height;
_sizeAnimation = Tween<double>(begin: widget.minHeight, end: _textHeight).animate(_controller);
Expand Down Expand Up @@ -262,7 +262,7 @@ class _FadeOpacity extends StatelessWidget {
stops: const <double>[0, 1],
colors: <Color>[
color,
color.withOpacity(0.1),
color.withValues(alpha: 0.1),
],
),
),
Expand Down
2 changes: 1 addition & 1 deletion lib/src/components/atoms/icon_text_button.dart
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ class ZdsIconTextButton extends StatelessWidget with Diagnosticable {
borderRadius: borderRadius,
color: backgroundColor ?? zetaColors.primary,
boxShadow: <BoxShadow>[
BoxShadow(blurRadius: 4, color: zetaColors.textDefault.withOpacity(0.2)),
BoxShadow(blurRadius: 4, color: zetaColors.textDefault.withValues(alpha: 0.2)),
],
),
child: Material(
Expand Down
4 changes: 2 additions & 2 deletions lib/src/components/atoms/selection_pills.dart
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ class ZdsSelectionPill extends StatelessWidget {
///
/// Custom color to override pill background color.
///
///Defaults to `colorScheme.secondary.withOpacity(0.1)`
///Defaults to `colorScheme.secondary.withValues(alpha:0.1)`
final Color? selectedColor;

///Use [color] instead. Will be deprecated in future release.
Expand All @@ -89,7 +89,7 @@ class ZdsSelectionPill extends StatelessWidget {
final Color background = disabled
? zetaColors.surfaceDisabled
: selected
? color?.surface ?? selectedColor?.withOpacity(0.2) ?? zetaColors.secondary.surface
? color?.surface ?? selectedColor?.withValues(alpha: 0.2) ?? zetaColors.secondary.surface
: themeData.colorScheme.surface;

final Color foreground = disabled
Expand Down
4 changes: 2 additions & 2 deletions lib/src/components/atoms/speed_slider.dart
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class ZdsSpeedSlider extends StatefulWidget {
final ScrollController? controller;

/// The default items for the slider.
static const defaultItems = _defaultAlphabet;
static const List<String> defaultItems = _defaultAlphabet;

@override
State<ZdsSpeedSlider> createState() => ZdsSpeedSliderState();
Expand All @@ -59,7 +59,7 @@ class ZdsSpeedSlider extends StatefulWidget {
/// The state of the [ZdsSpeedSlider]
class ZdsSpeedSliderState extends State<ZdsSpeedSlider> with FrameCallbackMixin {
late final ScrollController _scrollController;
final _scrollableKey = GlobalKey();
final GlobalKey<ScrollableState> _scrollableKey = GlobalKey<ScrollableState>();
late List<GlobalKey> _itemKeys;

int _selectedIndex = 0;
Expand Down
3 changes: 2 additions & 1 deletion lib/src/components/molecules/bottom_sheet.dart
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,8 @@ class _BottomSheetHeader extends StatelessWidget implements PreferredSizeWidget
final zetaColors = Zeta.of(context).colors;
return DecoratedBox(
decoration: BoxDecoration(
border: header != null ? Border(bottom: BorderSide(color: zetaColors.textDefault.withOpacity(0.1))) : null,
border:
header != null ? Border(bottom: BorderSide(color: zetaColors.textDefault.withValues(alpha: 0.1))) : null,
),
child: Column(
children: <Widget>[
Expand Down
10 changes: 5 additions & 5 deletions lib/src/components/molecules/date_range_picker.dart
Original file line number Diff line number Diff line change
Expand Up @@ -804,7 +804,7 @@ Future<DateTimeRange?> showZdsDateRangePicker({
int startingDayOfWeek = 0,
String? shortMonthDayFormat,
String? shortDateFormat,
}) async {
}) {
assert(
initialDateRange == null || !initialDateRange.start.isAfter(initialDateRange.end),
"initialDateRange's start date must not be after it's end date.",
Expand Down Expand Up @@ -1354,7 +1354,7 @@ class _ZdsDateRangePickerDialogState extends State<ZdsDateRangePickerDialog> wit
shortMonthDayFormat: widget.shortMonthDayFormat,
shortDateFormat: widget.shortDateFormat,
);
final DialogTheme dialogTheme = Theme.of(context).dialogTheme;
final DialogThemeData dialogTheme = Theme.of(context).dialogTheme;
size = orientation == Orientation.portrait ? _inputPortraitDialogSize : _inputRangeLandscapeDialogSize;
insetPadding = const EdgeInsets.symmetric(horizontal: 16, vertical: 24);
shape = dialogTheme.shape;
Expand Down Expand Up @@ -2378,7 +2378,7 @@ class MonthItemState extends State<MonthItem> {
}

Color _highlightColor(BuildContext context) {
return Theme.of(context).colorScheme.secondary.withOpacity(0.12);
return Theme.of(context).colorScheme.secondary.withValues(alpha: 0.12);
}

void _dayFocusChanged(bool focused) {
Expand Down Expand Up @@ -2456,7 +2456,7 @@ class MonthItemState extends State<MonthItem> {
textDirection: textDirection,
);
} else if (isDisabled) {
itemStyle = textTheme.bodyMedium?.apply(color: colorScheme.onSurface.withOpacity(0.38));
itemStyle = textTheme.bodyMedium?.apply(color: colorScheme.onSurface.withValues(alpha: 0.38));
} else if (DateUtils.isSameDay(widget.currentDate, dayToBuild)) {
// The current day gets a different text color and a circle stroke
// border.
Expand Down Expand Up @@ -2505,7 +2505,7 @@ class MonthItemState extends State<MonthItem> {
focusNode: _dayFocusNodes[day - 1],
onTap: () => widget.onChanged(dayToBuild),
radius: _monthItemRowHeight / 2 + 4,
splashColor: colorScheme.primary.withOpacity(0.38),
splashColor: colorScheme.primary.withValues(alpha: 0.38),
onFocusChange: _dayFocusChanged,
child: dayWidget,
);
Expand Down
2 changes: 1 addition & 1 deletion lib/src/components/molecules/dropdown.dart
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ class ZdsDropdownListState<T> extends State<ZdsDropdownList<T>> {
menuItemStyleData: MenuItemStyleData(
selectedMenuItemBuilder: (BuildContext context, Widget child) {
return ColoredBox(
color: themeData.colorScheme.secondary.withOpacity(0.1),
color: themeData.colorScheme.secondary.withValues(alpha: 0.1),
child: child,
);
},
Expand Down
2 changes: 1 addition & 1 deletion lib/src/components/molecules/input_dialog.dart
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ class ZdsInputDialogState extends State<ZdsInputDialog> {
ZdsButton.muted(
semanticLabel: widget.secondaryAction,
key: const Key('secondary_button'),
onTap: () async => Navigator.maybePop(context),
onTap: () => Navigator.maybePop(context),
child: Text(widget.secondaryAction!),
),
if (widget.secondaryAction != null) const SizedBox(width: 8),
Expand Down
Loading