You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
1.1 KiB
29 lines
1.1 KiB
import 'package:provider/provider.dart';
|
|
import 'package:responsive_builder/responsive_builder.dart';
|
|
import 'package:smartfit_app_mobile/modele/user.dart';
|
|
import 'package:smartfit_app_mobile/view/activity/mobile/mobile_Activity_view.dart';
|
|
import 'package:smartfit_app_mobile/view/activity/web/web_Activity_view.dart';
|
|
import 'package:flutter/material.dart';
|
|
import 'package:smartfit_app_mobile/view/home/no_activity_view.dart';
|
|
|
|
class Activity extends StatelessWidget {
|
|
const Activity({Key? key}) : super(key: key);
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return context
|
|
.watch<User>()
|
|
.managerSelectedActivity
|
|
.activitySelected
|
|
.isEmpty
|
|
? ScreenTypeLayout.builder(
|
|
mobile: (_) => const NoActivityView("Pas d'activité sélectionnée"),
|
|
desktop: (_) => const NoActivityView("Pas d'activité sélectionnée"),
|
|
)
|
|
: ScreenTypeLayout.builder(
|
|
mobile: (_) => const MobileActivity(),
|
|
desktop: (_) => const WebActivity(),
|
|
);
|
|
}
|
|
}
|