skip to Main Content

Hi guys I would like to add button under this code
so that there will be redirection to a website.

class EmptyServiceSearch extends StatelessWidget {
  const EmptyServiceSearch({Key key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return EmptyState(
      imageUrl: AppImages.emptySearch,
      title: "No Service/Provider Found".tr(),
      description: "There seems to be no Service/Provider".tr(),
      
    );
  } 
}

2

Answers


  1. You can use Stack to achieve this.

    Stack(
      children: [
        Button(),
        EmptyServiceSearch(),
      ],
    )
    

    If you want to add a button below, the you can use Column as following,

    Column(
      children: [
        EmptyServiceSearch(),
        Button(),
      ],
    )
    
    Login or Signup to reply.
  2. You can try to add a body under the description tag and then add a child to add Elevated Button which will give you a button… You can try to position the button in whichever manner you want to

    body: SingleChildScrollView(
          child: ElevatedButton(onPressed: onPressed, child: child),
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search