generateViewFile static method

dynamic generateViewFile(
  1. String className,
  2. String bPath
)

Implementation

static generateViewFile(String className, String bPath) {
  return '''
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import '$bPath';

class HomeView extends StatelessWidget {
const HomeView({super.key});

@override
Widget build(BuildContext context) {
  return BlocBuilder<${className}Bloc, ${className}State>(
    builder: (context, state) {
      return Scaffold(appBar: AppBar(), body: SizedBox());
    },
  );
}
}
  ''';
}