Skip to content

Commit 5fcc3d5

Browse files
committed
organized package code
1 parent 2dde99e commit 5fcc3d5

2 files changed

Lines changed: 22 additions & 15 deletions

File tree

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2020 Nick Romero
3+
Copyright (c) 2020 Nichole John Romero
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

lib/flutter_switch.dart

Lines changed: 21 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -73,21 +73,23 @@ class _FlutterSwitchState extends State<FlutterSwitch>
7373
width: widget.width,
7474
height: widget.height,
7575
decoration: BoxDecoration(
76-
borderRadius: BorderRadius.circular(20.0),
77-
color: _circleAnimation.value == Alignment.centerLeft
78-
? widget.inactiveColor
79-
: widget.activeColor),
76+
borderRadius: BorderRadius.circular(20.0),
77+
color: _circleAnimation.value == Alignment.centerLeft
78+
? widget.inactiveColor
79+
: widget.activeColor,
80+
),
8081
child: Padding(
81-
padding: const EdgeInsets.only(
82-
top: 4.0, bottom: 4.0, right: 4.0, left: 4.0),
82+
padding: const EdgeInsets.all(4.0),
8383
child: Row(
8484
mainAxisAlignment: MainAxisAlignment.spaceBetween,
8585
children: <Widget>[
8686
_circleAnimation.value == Alignment.centerRight
8787
? Expanded(
8888
child: Padding(
89-
padding:
90-
const EdgeInsets.only(left: 4.0, right: 4.0),
89+
padding: const EdgeInsets.only(
90+
left: 4.0,
91+
right: 4.0,
92+
),
9193
child: Text(
9294
widget.activeText,
9395
style: TextStyle(
@@ -104,21 +106,26 @@ class _FlutterSwitchState extends State<FlutterSwitch>
104106
width: widget.toggleSize,
105107
height: widget.toggleSize,
106108
decoration: BoxDecoration(
107-
shape: BoxShape.circle, color: Colors.white),
109+
shape: BoxShape.circle,
110+
color: Colors.white,
111+
),
108112
),
109113
),
110114
_circleAnimation.value == Alignment.centerLeft
111115
? Expanded(
112116
child: Container(
113117
alignment: Alignment.centerRight,
114-
padding:
115-
const EdgeInsets.only(left: 4.0, right: 5.0),
118+
padding: const EdgeInsets.only(
119+
left: 4.0,
120+
right: 5.0,
121+
),
116122
child: Text(
117123
widget.inactiveText,
118124
style: TextStyle(
119-
color: widget.inactiveTextColor,
120-
fontWeight: FontWeight.w900,
121-
fontSize: widget.valueFontSize),
125+
color: widget.inactiveTextColor,
126+
fontWeight: FontWeight.w900,
127+
fontSize: widget.valueFontSize,
128+
),
122129
),
123130
),
124131
)

0 commit comments

Comments
 (0)