Skip to content

Working on Web and Android but not on iOS. #144

@rmahfouz

Description

@rmahfouz

Steps to Reproduce
I added an auto_size_text widget to solve this problem despite using expanded and flexible.
here
I used maxLines:2, and It worked on the web and Android, but missing characters on iOS, as same as if used maxLines in a normal text Widget.
iOs

`Padding(
                  padding: const EdgeInsets.all(20.0),
                  child: GridView.count(crossAxisCount: 3,
                      scrollDirection: Axis.vertical,
                      mainAxisSpacing: 16,
                      crossAxisSpacing: 16,
                      primary: false,
                      children: <Widget>[
                        ElevatedButton(
                            onPressed: () {
                              Navigator.push(context, MaterialPageRoute(builder: (context) => const hypona_correction()));
                            },
                            style: ElevatedButton.styleFrom(
                              shape: RoundedRectangleBorder(
                                borderRadius: BorderRadius.circular(32.0),), backgroundColor: const Color(0xFFFFFFFF), disabledForegroundColor: const Color(0xFF959595).withOpacity(0.38), disabledBackgroundColor: const Color(0xFF959595).withOpacity(0.12),
                              elevation: 2,
                            ),
                            child:
                             const Column(
                              mainAxisAlignment: MainAxisAlignment.center,
                              children: [
                                Padding(
                                  padding: EdgeInsets.all(5.0),
                                  child: Icon(Icons.science,
                                    color: Color(0xFF560027),
                                  ),
                                ),
                                AutoSizeText('HypoNa \nCorrection',
                                  textAlign: TextAlign.center,
                                  maxLines: 2,
                                  style: TextStyle(
                                    color: Color(0xFF880e4f),

                                  ),
                                ),
                              ],
                                                         )
                        ),`

Version

  • Flutter version: [3.19.6]
  • auto_size_text version: [3.0.0]

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions