mirrored_repositories/Flutter_playground/packages/getx_examples/lib/src
import 'package:flutter/material.dart';
import 'package:flutter/widgets.dart';
import 'package:get/get.dart';
import 'package:getx_examples/src/home.dart';

class NextPage extends StatelessWidget {
  const NextPage({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text('Next Page'),
      ),
      body: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: [
            // get arguments here!
            // Text('${Get.arguments['name']} : ${Get.arguments['job']}'),
            Text(
                '${(Get.arguments as User).name} : ${(Get.arguments as User).age}'),
            ElevatedButton(
              child: const Text('Go Back'),
              onPressed: () {
                Get.back();
              },
            ),
          ],
        ),
      ),
    );
  }
}
