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(
|
2024-03-20 10:37:52 +08:00
|
|
|
child: Stack(children: [
|
|
|
|
const BackColors(),
|
|
|
|
SafeArea(
|
2024-03-21 14:09:49 +08:00
|
|
|
top: false,
|
2024-03-20 10:37:52 +08:00
|
|
|
child: Obx(() => Scaffold(
|
|
|
|
floatingActionButtonLocation:
|
|
|
|
FloatingActionButtonLocation.centerDocked,
|
2024-03-26 15:30:43 +08:00
|
|
|
floatingActionButton: [0].indexWhere(
|
|
|
|
(item) => item == controller.currentIndex.value) >
|
|
|
|
-1
|
2024-03-20 10:37:52 +08:00
|
|
|
? FloatingCreateButton()
|
|
|
|
: null,
|
|
|
|
bottomNavigationBar: BottomNavBar(),
|
|
|
|
backgroundColor: Colors.transparent,
|
|
|
|
body: Obx(
|
|
|
|
() => controller.pages[controller.currentIndex.value]),
|
|
|
|
)))
|
|
|
|
]),
|
2024-03-20 09:37:20 +08:00
|
|
|
);
|
2024-03-19 11:09:07 +08:00
|
|
|
}
|
|
|
|
}
|