import 'package:example/route/router.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:guru_widgets/tile/guru_list_tile.dart';
import 'package:guru_utils/router/router.dart';

import 'root_controller.dart';

class RootPage extends GetWidget<RootController> {
  const RootPage({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    final controller = Get.find<RootController>();
    final model = Get.find<RootController>().model;

    return Scaffold(
      backgroundColor: const Color(0xFF121212),
      appBar: AppBar(
        title: const Text('Guru Assistant'),
        backgroundColor: Colors.transparent,
        elevation: 0,
        centerTitle: true,
      ),
      body: Align(alignment: Alignment.topCenter, child: GuruListTile(
        title: 'Settings',
        onTap: () {
          RouteCenter.instance.openPath(Routes.settings.path());
        },
      )),
    );
  }
}
