Skip to content

Commit 2e1a9fa

Browse files
committed
refactor(switch): in switch, the onChanged attribute type is changed from Function to ValueChanged<b
1 parent 9179da5 commit 2e1a9fa

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

lib/switch.dart

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,10 @@ import 'package:flutter/cupertino.dart';
22

33
class WSwitch extends StatefulWidget {
44
const WSwitch({Key key, @required this.onChanged, this.activeColor = const Color(0xFF1AAD19)}) : super(key: key);
5-
final Function onChanged;
5+
final ValueChanged<bool> onChanged;
66
final Color activeColor;
77
@override
88
State<StatefulWidget> createState() {
9-
// TODO: implement createState
109
return _Switch();
1110
}
1211
}

0 commit comments

Comments
 (0)