import 'package:flutter/material.dart';

import 'package:provider/provider.dart';

import 'package:pshared/provider/account.dart';
import 'package:pshared/provider/email_verification.dart';

import 'package:pweb/pages/verification/content.dart';
import 'package:pweb/pages/verification/controller.dart';


class AccountVerificationPage extends StatelessWidget {
  final String token;

  const AccountVerificationPage({super.key, required this.token});

  @override
  Widget build(BuildContext context) {
    return ChangeNotifierProvider(
      create: (context) => AccountVerificationController(
        accountProvider: context.read<AccountProvider>(),
        verificationProvider: context.read<EmailVerificationProvider>(),
      )..startVerification(token),
      child: AccountVerificationContent(),
    );
  }
}