Skip to content

Commit

Permalink
Merge pull request #2 from SplashByte/dev
Browse files Browse the repository at this point in the history
Minor fix
  • Loading branch information
maeddin committed Mar 26, 2021
2 parents 71a7f4a + d2026ae commit 45a61c1
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## [0.1.1] - (2021-03-26)

- Minor fix

## [0.1.0] - (2021-03-26)

- Initial release
2 changes: 1 addition & 1 deletion example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ class _MyHomePageState extends State<MyHomePage> {
Padding(
padding: const EdgeInsets.all(8.0),
child: Text(
'Standard AnimatedToggleSwitch.rollingByHeight:',
'Standard AnimatedToggleSwitch.rolling:',
textAlign: TextAlign.center,
),
),
Expand Down
6 changes: 2 additions & 4 deletions lib/src/widgets/animated_toggle_switch.dart
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import 'dart:math';

import 'package:animated_toggle_switch/animated_toggle_switch.dart';
import 'package:animated_toggle_switch/src/utils.dart';
import 'package:flutter/gestures.dart';
import 'package:flutter/material.dart';

typedef IconBuilder<T> = Widget Function(T t, Size size, bool active);
Expand All @@ -26,8 +24,6 @@ class AnimatedToggleSwitch<T> extends StatefulWidget {
/// The IconBuilder for all icons with the specified size.
final AnimatedIconBuilder<T>? animatedIconBuilder;

//final TitleBuilder<T>? titleBuilder;

/// Builder for the color of the indicator depending on the current value.
final ColorBuilder<T>? colorBuilder;

Expand Down Expand Up @@ -402,6 +398,8 @@ class _AnimatedToggleSwitchState<T> extends State<AnimatedToggleSwitch<T>> with
builder: (c, color, child) => indicatorBuilder(indicatorSize, color as Color, borderRadius, child))),
if (widget.animatedIconBuilder != null)
Positioned(
right: 0.0,
left: 0.0,
top: (widget.height - indicatorSize.height) / 2 - widget.borderWidth,
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: animated_toggle_switch
description: Simple and animated switch with multiple choices. It's an easy way if you don't want something like a DropdownMenu.
version: 0.1.0
version: 0.1.1
repository: https://github.com/SplashByte/animated_toggle_switch

environment:
Expand Down

0 comments on commit 45a61c1

Please sign in to comment.