test_view.dart 666 B

123456789101112131415161718192021222324252627
  1. import 'package:flutter/material.dart';
  2. import 'package:get/get.dart';
  3. import 'test_controller.dart';
  4. class TestView extends GetView<TestController>{
  5. const TestView({super.key});
  6. static Bindings bindings(){
  7. return BindingsBuilder(() {
  8. Get.lazyPut<TestController>(() => TestController());
  9. });
  10. }
  11. @override
  12. Widget build(BuildContext context) {
  13. return const Scaffold(
  14. body: DefaultTextStyle(
  15. style: TextStyle(color: Colors.white),
  16. child: Stack(
  17. children: [
  18. Text('Hello World', style: TextStyle(fontSize: 43, fontWeight: FontWeight.w700))
  19. ],
  20. ),
  21. ));
  22. }
  23. }