mobile_skt/lib/screens/landing/landing.dart

35 lines
1.1 KiB
Dart
Raw Normal View History

2024-03-19 11:09:07 +08:00
// import 'dart:io';
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:sk_base_mobile/screens/landing/landing_controller.dart';
import 'package:sk_base_mobile/widgets/back_decoration.dart';
import 'package:sk_base_mobile/widgets/bottom_nav_bar.dart';
import 'package:sk_base_mobile/widgets/floating_action.dart';
class LandingPage extends StatelessWidget {
LandingPage({super.key});
final controller = Get.put<LandingController>(LandingController());
@override
Widget build(BuildContext context) {
return Material(
child: Stack(children: [
const BackColors(),
2024-04-01 14:59:20 +08:00
Obx(() => Scaffold(
floatingActionButtonLocation:
FloatingActionButtonLocation.centerDocked,
floatingActionButton: buildBody(),
bottomNavigationBar: BottomNavBar(),
backgroundColor: Colors.transparent,
body: Obx(() => controller.pages[controller.currentIndex.value]),
))
]),
);
2024-03-19 11:09:07 +08:00
}
2024-04-01 14:59:20 +08:00
Widget? buildBody() {
return controller.currentIndex.value == 0 ? FloatingCreateButton() : null;
}
2024-03-19 11:09:07 +08:00
}