✏️ add const + fix typo

profile
remrem 2 years ago
parent c097f28885
commit 44c38bbdb7

@ -206,14 +206,16 @@ class _WebProfileView extends State<WebProfileView> {
Navigator.push( Navigator.push(
context, context,
MaterialPageRoute( MaterialPageRoute(
builder: (context) => ChangeUsernameView(), builder: (context) =>
const ChangeUsernameView(),
), ),
); );
} else if (iObj["tag"] == "2") { } else if (iObj["tag"] == "2") {
Navigator.push( Navigator.push(
context, context,
MaterialPageRoute( MaterialPageRoute(
builder: (context) => ChangePasswordView(), builder: (context) =>
const ChangePasswordView(),
), ),
); );
} else { } else {
@ -264,7 +266,7 @@ class _WebProfileView extends State<WebProfileView> {
), ),
Expanded( Expanded(
child: Text( child: Text(
"Pop-up Notification", "Push Notifications",
style: TextStyle( style: TextStyle(
color: TColor.black, color: TColor.black,
fontSize: 12, fontSize: 12,
@ -273,9 +275,9 @@ class _WebProfileView extends State<WebProfileView> {
), ),
CustomAnimatedToggleSwitch<bool>( CustomAnimatedToggleSwitch<bool>(
current: positive, current: positive,
values: [false, true], values: const [false, true],
spacing: 0.0, spacing: 0.0,
indicatorSize: Size.square(25.0), indicatorSize: const Size.square(25.0),
animationDuration: animationDuration:
const Duration(milliseconds: 200), const Duration(milliseconds: 200),
animationCurve: Curves.linear, animationCurve: Curves.linear,
@ -283,7 +285,7 @@ class _WebProfileView extends State<WebProfileView> {
iconBuilder: (context, local, global) { iconBuilder: (context, local, global) {
return const SizedBox(); return const SizedBox();
}, },
cursors: ToggleCursors( cursors: const ToggleCursors(
defaultCursor: SystemMouseCursors.click), defaultCursor: SystemMouseCursors.click),
onTap: (_) => onTap: (_) =>
setState(() => positive = !positive), setState(() => positive = !positive),

Loading…
Cancel
Save