0

When enter task menu(android), it shows "Flutter Demo" instead of my app label string in Manifest xml file. In the screen pages, I used scaffold with no app bar, hence no title, but there's safe area widget inside.

Where shall I edit in order to have custom app tile name.

 @override
  Widget build(BuildContext context) {
    return Scaffold(
        backgroundColor: Colors.white,
        body: Center(
          child: SafeArea(
              child: Column(
mocha234
  • 127
  • 2
  • 11

3 Answers3

1

In MaterialApp() you have title property. You should change it in there.

MaterialApp(
  title: 'HERE GOES YOUR TITLE',
  home: Scaffold(
    appBar: AppBar(
      title: const Text('MaterialApp Theme'),
    ),
  ),
);
Sebastian
  • 3,666
  • 2
  • 19
  • 32
  • Hello. Thanks for replying. I may not want appbar. So I just need to omit the AppBar out right? Will try...and is material app applicable for statefulwidget or only stateless? – mocha234 Jun 04 '20 at 15:57
  • Yes, just omit the AppBar. Both. It has to be at the root of your app – Sebastian Jun 04 '20 at 15:58
0

first of all use MaterialApp Widget and warp your whole Widget tree in MaterialApp widget

MaterialApp(
  title: 'your app name',
  home: Scaffold(

then edit name and description property in pubspec.yaml

name: your app name
description: your app description

then chnage android:label in AndroidManifest.xml

<application
        android:label="your application name"

after all run flutter clean command and then flutter build

Amir
  • 2,225
  • 2
  • 18
  • 27
0
Try changing the name in pubspec.yaml file also like this 

1) Open pubspec.yaml file.

2 Scroll to top .

3) change the name field to your app name which want to set

4) and set tile like this also

MaterialApp(
  title: 'your app name',
  home: Scaffold(

enter image description here

Quick learner
  • 10,632
  • 4
  • 45
  • 55