# LifecycleDesign constructor

LifecycleDesign({

1. bool? isLazy,
2. List<String> initMethods = const [],
3. List<String> destroyMethods = const [],
4. bool enforceInitMethod = true,
5. bool enforceDestroyMethod = true,

})

Creates a LifecycleDesign with optional lifecycle configurations.

Describes lifecycle behavior of a component, such as initialization and destruction methods.

This class allows you to specify whether the component should be lazy-loaded, which methods should be called at initialization and destruction, and whether those lifecycle methods are enforced.

### Example

    final lifecycle = LifecycleDesign(
      isLazy: true,
      initMethods: ["initDatabase"],
      destroyMethods: ["closeDatabase"],
      enforceInitMethod: true,
      enforceDestroyMethod: true,
    );

    print(lifecycle.isLazy); // true
    print(lifecycle.initMethods); // ["initDatabase"]

## Implementation

    LifecycleDesign({
      this.isLazy,
      this.initMethods = const [],
      this.destroyMethods = const [],
      this.enforceInitMethod = true,
      this.enforceDestroyMethod = true,
    });