Skip to content

Commit

Permalink
REFACTOR: make schedule parameter required
Browse files Browse the repository at this point in the history
  • Loading branch information
uSlashVlad committed Sep 5, 2021
1 parent 2792e57 commit 0540a8e
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions lib/presentation/pages/schedule/schedule_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,13 @@ class _ScheduleScreenState extends State<ScheduleScreen> {
super.initState();
}

Widget _buildGroupButton(String group, String activeGroup, bool isActive,
[Schedule? schedule]) {
Widget _buildGroupButton(
String group, String activeGroup, bool isActive, Schedule schedule) {
if (isActive) {
return Padding(
padding: EdgeInsets.only(bottom: 10),
padding: const EdgeInsets.only(bottom: 10),
child: Container(
padding: EdgeInsets.only(left: 10),
padding: const EdgeInsets.only(left: 10),
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.spaceBetween,
Expand All @@ -53,10 +53,10 @@ class _ScheduleScreenState extends State<ScheduleScreen> {
group: group, activeGroup: activeGroup));
},
child: Icon(Icons.refresh_rounded,
color: schedule!.isRemote
color: schedule.isRemote
? DarkThemeColors.colorful05
: DarkThemeColors.colorful06),
shape: CircleBorder(),
shape: const CircleBorder(),
constraints:
const BoxConstraints(minWidth: 36.0, minHeight: 36.0),
),
Expand Down Expand Up @@ -114,7 +114,7 @@ class _ScheduleScreenState extends State<ScheduleScreen> {
RawMaterialButton(
onPressed: () {
context.read<ScheduleBloc>().add(ScheduleDeleteEvent(
group: group, schedule: schedule!));
group: group, schedule: schedule));
},
child: const Icon(Icons.delete_rounded),
shape: CircleBorder(),
Expand Down

0 comments on commit 0540a8e

Please sign in to comment.