-1

I added sub-Appbar on my application. How to view all text on the app bar without reducing font size?

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: submitRequestAppBar(context),
      body: Scaffold(
          appBar:
      PreferredSize(
      preferredSize: Size.fromHeight(40.0),
          child:
          AppBar(
            backgroundColor: Colors.grey[350],
            leading: Container(),
            title: Text(
              widget.title,
              textAlign: TextAlign.left,
              style: TextStyle(
                  fontWeight: FontWeight.bold,
                  color: Colors.black,
                  fontSize: 15.0),
            ),
          ),
      ),

enter image description here

  • i think you should not use two scaffolds in one view. Here what a Scaffold is https://api.flutter.dev/flutter/material/Scaffold-class.html. Depends on what you want to do with you second Appbar, why don't you style it inside of your (first and only) Scaffold's body? – Leonard Arnold May 21 '19 at 17:34

1 Answers1

0

You can create an scroll-animation to show the text that doesn't fit the screen. You can use this widget, the marquee. It's open-source so if you want to contribute you can just fork it and create a pull-request, from here.

It it's only wrapping you are after and don't care about the design. Then you should look into the solution on SO.

Haroun Hajem
  • 5,223
  • 3
  • 26
  • 39