Cirilla Documentations

  1. Home
  2. Docs
  3. Cirilla Documentations
  4. Advanced
  5. Wrap home child

Wrap home child

Used when you want to have attribute(s) or widget(s) built outside the home screen.

Requirement

  • Cirilla v4.0.0 or above

Build widget

Open file: cirilla/lib/hooks/wrap_home_child.dart

Add the code snippets to the wrapHomeChild function:

return Stack(
  children: [
    child,
    Positioned.fill(
      child: Center(
        child: Text(
          "Wrap Home",
          style: Theme.of(context).textTheme.displayMedium?.copyWith(color: Colors.white, backgroundColor: Colors.red),
        ),
      ),
    ),
  ],
);

Note

Have text widgets, you should setting style for this text
Was this article helpful to you? Yes No

How can we help?