import 'package:cpt_profile/modules/profile_edit/profile_edit_view_model.dart';
import 'package:cpt_profile/router/page/profile_page_router.dart';
import 'package:flutter/material.dart';
import 'package:auto_route/auto_route.dart';
import 'package:hooks_riverpod/hooks_riverpod.dart';
import 'package:router/ext/auto_router_extensions.dart';

@RoutePage()
class ProfileEditPage extends HookConsumerWidget {
  const ProfileEditPage({Key? key}) : super(key: key);

  //启动当前页面
  static void startInstance({BuildContext? context}) {
    if (context != null) {
      context.router.push(const ProfileEditPageRoute());
    } else {
      appRouter.push(const ProfileEditPageRoute());
    }
  }

  @override
  Widget build(BuildContext context, WidgetRef ref) {
    final _viewModel = ref.watch(profileEditViewModelProvider.notifier);

    return Scaffold(
      appBar: AppBar(title: Text("Profile Edit Page")),
      body: Center(
        child: Text("Profile Edit Page"),
      ),
    );
  }
}
