import 'package:flutter/material.dart'; import 'package:thesis_shop/benchmark_counter.dart'; import 'package:thesis_shop/stores/user_store.dart'; class UserSwitch extends StatelessWidget { const UserSwitch() : super(key: const Key('user_switch')); @override Widget build(BuildContext context) { final userStore = UserStore.of(context); BenchmarkCounters.userSwitch++; return Row( mainAxisSize: MainAxisSize.min, children: [ const Icon(Icons.account_circle), Switch( value: userStore.isSignedIn, onChanged: userStore.setIsSignedIn, activeColor: Colors.green, ) ], ); } }