layoutStatelessNotifierNoChildTemplate top-level constant

String const layoutStatelessNotifierNoChildTemplate

Implementation

const String layoutStatelessNotifierNoChildTemplate =
    """import 'package:projectName/core.dart';\nimport 'package:flutter/foundation.dart';\n

class className extends StatelessWidget {

  /// ### `className`
  ///
  /// `Description`:
  ///
  /// `Example`:
  // TODO: Implement the className
  const className({Key? key}) : super(key: key);

  /// `widgetKey`: current widget key which will be important when testing widget
  static const Key widgetKey = ValueKey("className");

  @override
  Widget build(BuildContext context) {
    return ChangeNotifierProvider(
      create: (_) => classNameState(),
      child: AdaptivePlatformWidget(child: Container()),
    );
  }
}

class classNameState extends ChangeNotifier with DiagnosticableTreeMixin
    implements ReassembleHandler {
      bool isDisposed = false;

  bool get mounted => !isDisposed;

  classNameState(){

  }

  @override
  void debugFillProperties(DiagnosticPropertiesBuilder properties) {
    super.debugFillProperties(properties);

    /// list all the properties of your class here.
    /// See the documentation of debugFillProperties for more information.
    /// TODO: implement add
    properties.add(StringProperty('className', null));
  }

  @override
  void reassemble() {
    /// TODO: reassemble
    print('Did hot-reload className');
  }

  @override
  void notifyListeners() {
    if (!isDisposed) {
      super.notifyListeners();
    }
  }

  @override
  void dispose() {
    /// TODO: dispose
    isDisposed = true;
    super.dispose();
  }
}
""";