Home > Software engineering >  How to remove these lines between Row children
How to remove these lines between Row children

Time:05-28

I'm new to flutter, and I'm trying to divide the screen into three parts, here's my attempt :

class Homepage extends Statelesswidget { 
  const HomePage({Key? key}): super (key: key);

  @override
  Widget build(BuildContext context) {
    return Row(children: [
      const Expanded(
        flex: 1,
        child: Scaffold(
          body: Center(child: Text("Left")),
        ), // Scaffold
      ), // Expanded
      Expanded(
        flex: 2,
        child: Scaffold(
          appBar: AppBar(),
          body: const Center(child: Text("Middle")),
        ), // Scaffold
      ), // Expanded
      const Expanded(
        flex: 1,
        child: Scaffold(
          body: Center(child: Text("Right")),
        ), // Scaffold
      ) // Expanded
    ]);
  }
}

and main.dart looks like:

void main() {
  runApp(const MyApp());
}

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

  @override
  Widget build(BuildContext context) {
    return const MaterialApp(
      home: HomePage(),
      debugShowCheckedModeBanner: false,
    );
  }
}

Here's the result : https://i.imgur.com/Y1sRGIT.png I got these vertical lines out of nowhere, how can I get rid of them, please?

CodePudding user response:

Welcome to Flutter

  • Related