Untitled

mail@pastecode.io avatar
unknown
plain_text
a year ago
805 B
4
Indexable
Never
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:use_case_flutter/onepage/onepagevm.dart';

import '../secondpage/secondpage.dart';

class OnePage extends StatelessWidget {
  late OnePageVM _onePageVM;
  OnePage({super.key});

  @override
  Widget build(BuildContext context) {
    _onePageVM = Get.put(OnePageVM());
    return Obx(
      () => Scaffold(
        body: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: [
            ElevatedButton(
                onPressed: () {
                  Get.to(SecondPage());
                },
                child: const Text('İkinci Sayfa')),
            Center(child: Text(_onePageVM.isApproved.value == true ? 'Onaylı' : 'Onaysız')),
          ],
        ),
      ),
    );
  }
}