Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I have issue when using VStack with widgets #11

Open
jsonpreet opened this issue Apr 8, 2020 · 3 comments
Open

I have issue when using VStack with widgets #11

jsonpreet opened this issue Apr 8, 2020 · 3 comments
Labels
help wanted Extra attention is needed

Comments

@jsonpreet
Copy link

Describe the bug
I am using VStack() with Widget, and My Widget is calling from another dart file its bottomNavigationBar(). When i am using it and running my app i got error

════════ Exception caught by scheduler library ═════════════════════════════════
RenderBox was not laid out: RenderParagraph#49ab5 NEEDS-LAYOUT NEEDS-PAINT
'package:flutter/src/rendering/box.dart':
Failed assertion: line 1687 pos 12: 'hasSize'
Screenshot_1

@jsonpreet
Copy link
Author

Its VelocityX version: velocity_x: ^0.3.0

@iampawan
Copy link
Owner

iampawan commented Apr 9, 2020

Can you replace it with the normal column & check it out? I don't think it's anything to do with VStack()

@iampawan iampawan added the help wanted Extra attention is needed label Apr 9, 2020
@hasnentai
Copy link

hasnentai commented Apr 9, 2020

@harpreet9629 I tried understanding your issue and I am not able to recreate it. Here's what and I understood and tried so far and it's working fine. Let me know if it's wrong.

Here is Build Method for Scaffold.

class MyLandingPage extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: [
        bottomNav()
      ].vStack()
    );
  }
}

Here is my bottomNav() in a separate file named bottom_nav.dart

import 'package:flutter/material.dart';

Widget bottomNav( ){
  return BottomNavigationBar(
  type: BottomNavigationBarType.fixed,
    items: [
    BottomNavigationBarItem(
      icon: Icon(Icons.home),
      title: Text("Home")
    ),
    BottomNavigationBarItem(
      icon: Icon(Icons.home),
      title: Text("Home")
    ),
    BottomNavigationBarItem(
      icon: Icon(Icons.home),
      title: Text("Home")
    )
  ]);
}


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants