// ignore_for_file: always_use_package_imports

import 'package:flutter/material.dart';
import 'package:wyatt_bloc_helper/wyatt_bloc_helper.dart';

import '../blocs/feature_name_cubit/feature_name_cubit.dart';
import '../stateless/feature_name_widget.dart';
import 'feature_name_parent.dart';

/// {@template feature_name_screen}
/// FeatureNameScreen is the merge of Provider and Consumer.
/// {@endtemplate}
class FeatureNameScreen
    extends CubitScreen<FeatureNameCubit, FeatureNameState> {
  /// {@macro feature_name_screen}
  const FeatureNameScreen({super.key});

  @override
  FeatureNameCubit create(BuildContext context) => FeatureNameCubit();

  @override
  FeatureNameCubit init(BuildContext context, FeatureNameCubit bloc) =>
      bloc..yourCustomFunction();

  @override
  Widget parent(BuildContext context, Widget child) =>
      FeatureNameParent(child: child);

  // Rebuild on every bloc changes
  @override
  Widget onBuild(BuildContext context, FeatureNameState state) =>
      const FeatureNameWidget();
}
