Skip to content

Commit

Permalink
chore: dependencies (#18)
Browse files Browse the repository at this point in the history
fix: update to flutter 3.22.0
fix: update to zeta_flutter 0.9.1
fix: update interval time picker to work with flutter 3.22.0

docs: Update documentation and remove some ignores

chore: Update licenses

deps: Update to intl 0.19.0
deps: Update to latest version of image_editor_plus
  • Loading branch information
thelukewalton authored May 20, 2024
1 parent b93033f commit 8fa214e
Show file tree
Hide file tree
Showing 38 changed files with 3,008 additions and 145 deletions.
98 changes: 92 additions & 6 deletions LICENSE-3RD-PARTY
Original file line number Diff line number Diff line change
@@ -1,6 +1,92 @@
-----------------------------------------------------------------------------
BSD-3-Clause
applies to:
- DatePickerDialog
- Quill
-----------------------------------------------------------------------------
# THIRD PARTY LICENSES

---

### Flutter

Applies to:

- interval_time_picker.dart
- date_range_picker.dart

Copyright 2014 The Flutter Authors. All rights reserved.

Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:

* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following
disclaimer in the documentation and/or other materials provided
with the distribution.
* Neither the name of Google Inc. nor the names of its
contributors may be used to endorse or promote products derived
from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

---

### Quill

Applies to:

- quill.min.js

Copyright (c) 2017-2024, Slab
Copyright (c) 2014, Jason Chen
Copyright (c) 2013, salesforce.com
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:

1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.

3. Neither the name of the copyright holder nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

---

### interval_time_picker

Applies to:

- interval_time_picker.dart

Copyright 2020-2022 Fleximex

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
6 changes: 3 additions & 3 deletions example/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ SPEC CHECKSUMS:
flutter_image_compress_common: ec1d45c362c9d30a3f6a0426c297f47c52007e3e
flutter_inappwebview_ios: 97215cf7d4677db55df76782dbd2930c5e1c1ea0
flutter_keyboard_visibility: 0339d06371254c3eb25eeb90ba8d17dca8f9c069
image_picker_ios: b545a5f16c0fa88e3ecbbce3ed4de45567a8ec18
image_picker_ios: c560581cceedb403a6ff17f2f816d7fea1421fc1
irondash_engine_context: 3458bf979b90d616ffb8ae03a150bafe2e860cc9
JPSVolumeButtonHandler: 53110330c9168ed325def93eabff39f0fe3e8082
just_audio: baa7252489dbcf47a4c7cc9ca663e9661c99aafa
Expand All @@ -235,9 +235,9 @@ SPEC CHECKSUMS:
sqflite: 673a0e54cc04b7d6dba8d24fb8095b31c3a99eec
super_native_extensions: 4916b3c627a9c7fffdc48a23a9eca0b1ac228fa7
SwiftyGif: 93a1cc87bf3a51916001cf8f3d63835fb64c819f
url_launcher_ios: 6116280ddcfe98ab8820085d8d76ae7449447586
url_launcher_ios: 5334b05cef931de560670eeae103fd3e431ac3fe
video_compress: fce97e4fb1dfd88175aa07d2ffc8a2f297f87fbe
video_player_avfoundation: 2b4384f3b157206b5e150a0083cdc0c905d260d3
video_player_avfoundation: 7c6c11d8470e1675df7397027218274b6d2360b3
wakelock_plus: 78ec7c5b202cab7761af8e2b2b3d0671be6c4ae1

PODFILE CHECKSUM: ef2759a31e8883d6b534c00ef22a7f4104f8de0d
Expand Down
4 changes: 2 additions & 2 deletions example/lib/pages/theme/colors.dart
Original file line number Diff line number Diff line change
Expand Up @@ -95,12 +95,12 @@ class ColorsDemo extends StatelessWidget {
'subtitle': 'Theme.of(context).colorScheme.onSurface',
},
{
'color': Theme.of(context).colorScheme.background,
'color': Theme.of(context).colorScheme.surface,
'name': 'background',
'subtitle': 'Theme.of(context).colorScheme.background',
},
{
'color': Theme.of(context).colorScheme.onBackground,
'color': Theme.of(context).colorScheme.onSurface,
'name': 'onBackground',
'subtitle': 'Theme.of(context).colorScheme.onBackground',
},
Expand Down
4 changes: 2 additions & 2 deletions example/macos/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -126,9 +126,9 @@ SPEC CHECKSUMS:
shared_preferences_foundation: fcdcbc04712aee1108ac7fda236f363274528f78
sqflite: 673a0e54cc04b7d6dba8d24fb8095b31c3a99eec
super_native_extensions: 85efee3a7495b46b04befcfc86ed12069264ebf3
url_launcher_macos: d2691c7dd33ed713bf3544850a623080ec693d95
url_launcher_macos: 5f437abeda8c85500ceb03f5c1938a8c5a705399
video_compress: c896234f100791b5fef7f049afa38f6d2ef7b42f
video_player_avfoundation: 2b4384f3b157206b5e150a0083cdc0c905d260d3
video_player_avfoundation: 7c6c11d8470e1675df7397027218274b6d2360b3
wakelock_plus: 4783562c9a43d209c458cb9b30692134af456269

PODFILE CHECKSUM: 813f07c89880cd0ec4c0da55108415b820f8783a
Expand Down
2 changes: 2 additions & 0 deletions example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ dependencies:
scrollable_positioned_list: ^0.3.8
url_launcher: ^6.2.5
cross_file: ^0.3.3+8
zeta_flutter: any
intl: any

flutter:
uses-material-design: true
Expand Down
42 changes: 21 additions & 21 deletions lib/src/components/atoms/button.dart
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ class ZdsButton extends StatelessWidget {
final Color defaultBackground = customColor ?? (isDangerButton ? zetaColors.negative : zetaColors.secondary);

// Common textStyle for all variants.
final textStyle = MaterialStateProperty.all(textTheme.titleMedium?.copyWith(fontWeight: FontWeight.w500));
final textStyle = WidgetStateProperty.all(textTheme.titleMedium?.copyWith(fontWeight: FontWeight.w500));

// Helper function to calculate the overlay color.
Color calculateOverlay({double opacity = 0.1, Color? background}) {
Expand All @@ -261,88 +261,88 @@ class ZdsButton extends StatelessWidget {
switch (variant) {
case ZdsButtonVariant.filled:
return ButtonStyle(
padding: MaterialStateProperty.all(tp),
padding: WidgetStateProperty.all(tp),
textStyle: textStyle,
foregroundColor: materialStatePropertyResolver(
foregroundColor: widgetStatePropertyResolver(
defaultValue: defaultBackground.onColor,
disabledValue: zetaColors.textDisabled,
),
backgroundColor: materialStatePropertyResolver(
backgroundColor: widgetStatePropertyResolver(
defaultValue: defaultBackground,
disabledValue: zetaColors.surfaceDisabled,
),
overlayColor: materialStatePropertyResolver(
overlayColor: widgetStatePropertyResolver(
hoveredValue: defaultBackground.darken(5), // Slight darkening for hover
pressedValue: defaultBackground.darken(15), // More noticeable darkening for pressed state
defaultValue: Colors.transparent,
),
side: materialStatePropertyResolver(
side: widgetStatePropertyResolver(
focusedValue: BorderSide(color: zetaColors.secondary.subtle, width: 3),
disabledValue: BorderSide(color: zetaColors.borderDisabled),
),
);
case ZdsButtonVariant.outlined:
return ButtonStyle(
padding: MaterialStateProperty.all(tp),
padding: WidgetStateProperty.all(tp),
textStyle: textStyle,
foregroundColor: materialStatePropertyResolver(
foregroundColor: widgetStatePropertyResolver(
defaultValue: defaultBackground,
disabledValue: zetaColors.textDisabled,
),
backgroundColor: materialStatePropertyResolver(
backgroundColor: widgetStatePropertyResolver(
defaultValue: Colors.transparent,
disabledValue: zetaColors.surfaceDisabled,
),
overlayColor: materialStatePropertyResolver(
overlayColor: widgetStatePropertyResolver(
defaultValue: Colors.transparent,
hoveredValue: calculateOverlay(),
pressedValue: calculateOverlay(opacity: 0.2),
),
side: materialStatePropertyResolver(
side: widgetStatePropertyResolver(
focusedValue: BorderSide(color: zetaColors.secondary.subtle, width: 3),
defaultValue: BorderSide(color: defaultBackground),
disabledValue: BorderSide(color: zetaColors.borderDisabled),
),
);
case ZdsButtonVariant.text:
return ButtonStyle(
padding: MaterialStateProperty.all(tp),
padding: WidgetStateProperty.all(tp),
textStyle: textStyle,
foregroundColor: materialStatePropertyResolver(
foregroundColor: widgetStatePropertyResolver(
defaultValue: isOnDarkBackground ? zetaColors.textInverse : defaultBackground,
disabledValue: zetaColors.textDisabled,
),
backgroundColor: materialStatePropertyResolver(
backgroundColor: widgetStatePropertyResolver(
defaultValue: Colors.transparent,
),
overlayColor: materialStatePropertyResolver(
overlayColor: widgetStatePropertyResolver(
defaultValue: Colors.transparent,
hoveredValue: calculateOverlay(),
pressedValue: calculateOverlay(opacity: 0.2),
),
side: materialStatePropertyResolver(
side: widgetStatePropertyResolver(
focusedValue: BorderSide(color: zetaColors.secondary.subtle, width: 3),
disabledValue: const BorderSide(color: Colors.transparent),
),
);
case ZdsButtonVariant.muted:
return ButtonStyle(
padding: MaterialStateProperty.all(tp),
padding: WidgetStateProperty.all(tp),
textStyle: textStyle,
foregroundColor: materialStatePropertyResolver(
foregroundColor: widgetStatePropertyResolver(
defaultValue: zetaColors.textDefault,
disabledValue: zetaColors.textDisabled,
),
backgroundColor: materialStatePropertyResolver(
backgroundColor: widgetStatePropertyResolver(
defaultValue: Colors.transparent,
disabledValue: zetaColors.surfaceDisabled,
),
overlayColor: materialStatePropertyResolver(
overlayColor: widgetStatePropertyResolver(
defaultValue: Colors.transparent,
hoveredValue: calculateOverlay(background: zetaColors.borderDefault),
pressedValue: calculateOverlay(background: zetaColors.borderDefault, opacity: 0.2),
),
side: materialStatePropertyResolver(
side: widgetStatePropertyResolver(
focusedValue: BorderSide(color: zetaColors.secondary.subtle, width: 3),
disabledValue: BorderSide(color: zetaColors.borderDisabled),
defaultValue: BorderSide(color: zetaColors.borderDefault),
Expand Down
10 changes: 5 additions & 5 deletions lib/src/components/atoms/expandable.dart
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,15 @@ class ZdsExpandable extends StatelessWidget {

/// The color to be used for the fadeout gradient indicating the widget is collapsed.
///
/// Defaults to [ColorScheme.background].
/// Defaults to [ColorScheme.surface].
final Color? color;

@override
Widget build(BuildContext context) {
return child.readMore(
collapsedButtonText: collapsedButtonText,
expandedButtonText: expandedButtonText,
color: color ?? Theme.of(context).colorScheme.background,
color: color ?? Theme.of(context).colorScheme.surface,
minHeight: minHeight,
);
}
Expand Down Expand Up @@ -137,7 +137,7 @@ class _ExpandableContainerState extends State<_ExpandableContainer> with SingleT
contentKey: _keyText,
button: TextButton(
style: TextButton.styleFrom(
foregroundColor: Theme.of(context).elevatedButtonTheme.style!.backgroundColor!.resolve(<MaterialState>{}),
foregroundColor: Theme.of(context).elevatedButtonTheme.style!.backgroundColor!.resolve(<WidgetState>{}),
backgroundColor: Colors.transparent,
),
onPressed: isExpanded ? collapse : expand,
Expand Down Expand Up @@ -290,7 +290,7 @@ extension ExpandableTextExtension on Widget {
///
/// [collapsedButtonText] and [expandedButtonText] define the button's text for when the widget is collapsed and
/// expanded respectively. [color] defines the color to be used for the fadeout gradient indicating the widget is
/// collapsed, and defaults to [ColorScheme.background].
/// collapsed, and defaults to [ColorScheme.surface].
///
/// See also:
///
Expand All @@ -313,7 +313,7 @@ extension ExpandableTextExtension on Widget {
collapsedButtonText.isEmpty ? strings.get('READ_MORE', 'Read more') : collapsedButtonText,
expandedButtonText: expandedButtonText.isEmpty ? strings.get('COLLAPSE', 'Collapse') : expandedButtonText,
minHeight: minHeight,
color: color ?? Theme.of(context).colorScheme.background,
color: color ?? Theme.of(context).colorScheme.surface,
child: this,
);
},
Expand Down
2 changes: 1 addition & 1 deletion lib/src/components/atoms/toggle_button.dart
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ class ZdsToggleButtonState extends State<ZdsToggleButton> {
color: (index == _selectedValue)
? widget.foregroundColor ??
(widget.backgroundColor ?? Theme.of(context).colorScheme.primary).onColor
: Theme.of(context).colorScheme.onBackground,
: Theme.of(context).colorScheme.onSurface,
),
child: Text(widget.values[index]),
),
Expand Down
2 changes: 1 addition & 1 deletion lib/src/components/molecules/block_table.dart
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,7 @@ class _BlockTable extends State<ZdsBlockTable> with WidgetsBindingObserver {
color: isSelected
? themeData.colorScheme.secondary.withLight(
0.1,
background: themeData.colorScheme.background,
background: themeData.colorScheme.surface,
)
: tableCell.backgroundColor ?? themeData.colorScheme.surface,
),
Expand Down
4 changes: 2 additions & 2 deletions lib/src/components/molecules/bottom_sheet.dart
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class ZdsBottomSheet extends StatelessWidget {

/// The background color for this bottom sheet.
///
/// Defaults to [ColorScheme.background]
/// Defaults to [ColorScheme.surface]
final Color? backgroundColor;

/// How high this bottom sheet will be allowed to grow. If not null, it must be greater than 0. The bottom sheet will
Expand All @@ -56,7 +56,7 @@ class ZdsBottomSheet extends StatelessWidget {
@override
Widget build(BuildContext context) {
final ColorScheme colorScheme = Theme.of(context).colorScheme;
final Color sheetBackgroundColor = backgroundColor ?? colorScheme.background;
final Color sheetBackgroundColor = backgroundColor ?? colorScheme.surface;
final Color headerColor = header != null ? colorScheme.surface : sheetBackgroundColor;
final _BottomSheetHeader headerWidget = _BottomSheetHeader(bottom: header, backgroundColor: headerColor);
final MediaQueryData media = MediaQuery.of(context);
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
@@ -1,6 +1,6 @@
// Copyright 2014 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// found in the LICENSE-3RD-PARTY file.

import 'dart:async';
import 'dart:math' as math;
Expand Down
3 changes: 1 addition & 2 deletions lib/src/components/molecules/date_time_picker.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ import 'dart:async';

import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:interval_time_picker/interval_time_picker.dart' as interval_picker;

import 'package:intl/intl.dart';
import 'package:zeta_flutter/zeta_flutter.dart';

Expand All @@ -13,6 +11,7 @@ import '../../utils/theme/theme.dart';
import '../../utils/tools/controller.dart';
import '../organisms/date_range_picker_tile.dart';
import '../organisms/fiscal_date_picker.dart';
import 'interval_time_picker.dart' as interval_picker;

/// Variants of [ZdsDateTimePicker].
enum DateTimePickerMode {
Expand Down
Loading

0 comments on commit 8fa214e

Please sign in to comment.