Skip to content

Commit

Permalink
fix speed dial secondary text
Browse files Browse the repository at this point in the history
  • Loading branch information
lcsvcn committed Dec 5, 2022
1 parent b5c00e0 commit ae55cf6
Show file tree
Hide file tree
Showing 11 changed files with 67 additions and 112 deletions.
29 changes: 0 additions & 29 deletions .packages

This file was deleted.

3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## 2.2.3
- Fix https://github.com/lcsvcn/speed_dial_fab/issues/4

## 2.2.2
- Fix analysis issues

Expand Down
2 changes: 1 addition & 1 deletion example/ios/Flutter/AppFrameworkInfo.plist
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@
<key>CFBundleVersion</key>
<string>1.0</string>
<key>MinimumOSVersion</key>
<string>8.0</string>
<string>11.0</string>
</dict>
</plist>
10 changes: 5 additions & 5 deletions example/ios/Runner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
archiveVersion = 1;
classes = {
};
objectVersion = 46;
objectVersion = 50;
objects = {

/* Begin PBXBuildFile section */
Expand Down Expand Up @@ -127,7 +127,7 @@
97C146E61CF9000F007C117D /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 1020;
LastUpgradeCheck = 1300;
ORGANIZATIONNAME = "";
TargetAttributes = {
97C146ED1CF9000F007C117D = {
Expand Down Expand Up @@ -272,7 +272,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SUPPORTED_PLATFORMS = iphoneos;
Expand Down Expand Up @@ -354,7 +354,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
Expand Down Expand Up @@ -403,7 +403,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SUPPORTED_PLATFORMS = iphoneos;
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1020"
LastUpgradeVersion = "1300"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
2 changes: 2 additions & 0 deletions example/ios/Runner/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,7 @@
</array>
<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>
<key>CADisableMinimumFrameDurationOnPhone</key>
<true/>
</dict>
</plist>
53 changes: 23 additions & 30 deletions example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ packages:
name: async
url: "https://pub.dartlang.org"
source: hosted
version: "2.5.0"
version: "2.9.0"
boolean_selector:
dependency: transitive
description:
Expand All @@ -21,42 +21,35 @@ packages:
name: characters
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.0"
charcode:
dependency: transitive
description:
name: charcode
url: "https://pub.dartlang.org"
source: hosted
version: "1.2.0"
version: "1.2.1"
clock:
dependency: transitive
description:
name: clock
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.0"
version: "1.1.1"
collection:
dependency: transitive
description:
name: collection
url: "https://pub.dartlang.org"
source: hosted
version: "1.15.0"
version: "1.16.0"
cupertino_icons:
dependency: "direct main"
description:
name: cupertino_icons
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.2"
version: "1.0.5"
fake_async:
dependency: transitive
description:
name: fake_async
url: "https://pub.dartlang.org"
source: hosted
version: "1.2.0"
version: "1.3.1"
flutter:
dependency: "direct main"
description: flutter
Expand All @@ -73,21 +66,28 @@ packages:
name: matcher
url: "https://pub.dartlang.org"
source: hosted
version: "0.12.10"
version: "0.12.12"
material_color_utilities:
dependency: transitive
description:
name: material_color_utilities
url: "https://pub.dartlang.org"
source: hosted
version: "0.1.5"
meta:
dependency: transitive
description:
name: meta
url: "https://pub.dartlang.org"
source: hosted
version: "1.3.0"
version: "1.8.0"
path:
dependency: transitive
description:
name: path
url: "https://pub.dartlang.org"
source: hosted
version: "1.8.0"
version: "1.8.2"
sky_engine:
dependency: transitive
description: flutter
Expand All @@ -99,14 +99,14 @@ packages:
name: source_span
url: "https://pub.dartlang.org"
source: hosted
version: "1.8.0"
version: "1.9.0"
speed_dial_fab:
dependency: "direct main"
description:
path: ".."
relative: true
source: path
version: "2.1.1"
version: "2.2.3"
stack_trace:
dependency: transitive
description:
Expand All @@ -127,34 +127,27 @@ packages:
name: string_scanner
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.0"
version: "1.1.1"
term_glyph:
dependency: transitive
description:
name: term_glyph
url: "https://pub.dartlang.org"
source: hosted
version: "1.2.0"
version: "1.2.1"
test_api:
dependency: transitive
description:
name: test_api
url: "https://pub.dartlang.org"
source: hosted
version: "0.2.19"
typed_data:
dependency: transitive
description:
name: typed_data
url: "https://pub.dartlang.org"
source: hosted
version: "1.3.0"
version: "0.4.12"
vector_math:
dependency: transitive
description:
name: vector_math
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.0"
version: "2.1.2"
sdks:
dart: ">=2.12.0 <3.0.0"
dart: ">=2.17.0-0 <3.0.0"
23 changes: 8 additions & 15 deletions lib/speed_dial_fab.dart
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,7 @@ class SpeedDialFabWidget extends StatefulWidget {
State createState() => SpeedDialFabWidgetState();
}

class SpeedDialFabWidgetState extends State<SpeedDialFabWidget>
with TickerProviderStateMixin {
class SpeedDialFabWidgetState extends State<SpeedDialFabWidget> with TickerProviderStateMixin {
late AnimationController _controller;

@override
Expand All @@ -73,13 +72,11 @@ class SpeedDialFabWidgetState extends State<SpeedDialFabWidget>
duration: const Duration(milliseconds: 500),
);

if (widget.secondaryIconsList.length !=
widget.secondaryIconsOnPress.length) {
if (widget.secondaryIconsList.length != widget.secondaryIconsOnPress.length) {
throw ("secondaryIconsList should have the same length of secondaryIconsOnPress");
}
if (widget.secondaryIconsText != null) {
if (widget.secondaryIconsText?.length !=
widget.secondaryIconsOnPress.length) {
if (widget.secondaryIconsText?.length != widget.secondaryIconsOnPress.length) {
throw ("secondaryIconsText should have the same length of secondaryIconsOnPress");
}
}
Expand Down Expand Up @@ -118,7 +115,8 @@ class SpeedDialFabWidgetState extends State<SpeedDialFabWidget>
),
),
child: Stack(
children: <Widget>[
clipBehavior: Clip.none,
children: [
FloatingActionButton(
elevation: 10,
tooltip: widget.secondaryIconsText![index],
Expand All @@ -129,8 +127,7 @@ class SpeedDialFabWidgetState extends State<SpeedDialFabWidget>
widget.secondaryIconsList[index],
color: widget.secondaryForegroundColor,
),
onPressed:
widget.secondaryIconsOnPress[index] as void Function(),
onPressed: widget.secondaryIconsOnPress[index] as void Function(),
),
Positioned(
right: 51.0,
Expand All @@ -144,9 +141,7 @@ class SpeedDialFabWidgetState extends State<SpeedDialFabWidget>
child: Padding(
padding: EdgeInsets.all(9),
child: Text(
(widget.secondaryIconsText != null)
? widget.secondaryIconsText![index]
: "",
widget.secondaryIconsText?[index] ?? "",
style: TextStyle(
color: widget.secondaryForegroundColor,
fontWeight: FontWeight.w900,
Expand Down Expand Up @@ -179,9 +174,7 @@ class SpeedDialFabWidgetState extends State<SpeedDialFabWidget>
),
alignment: FractionalOffset.center,
child: Icon(
_controller.isDismissed
? widget.primaryIconExpand
: widget.primaryIconCollapse,
_controller.isDismissed ? widget.primaryIconExpand : widget.primaryIconCollapse,
color: widget.primaryForegroundColor,
),
);
Expand Down
Loading

0 comments on commit ae55cf6

Please sign in to comment.