Skip to content

Instantly share code, notes, and snippets.

@huynguyennovem
Created April 9, 2023 03:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save huynguyennovem/806a3a53b01680b761e13831b1534433 to your computer and use it in GitHub Desktop.
Save huynguyennovem/806a3a53b01680b761e13831b1534433 to your computer and use it in GitHub Desktop.
import 'package:flutter/material.dart';

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

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Flutter Demo'),
        ),
        body: Padding(
          padding: const EdgeInsets.all(16.0),
          child: Column(
            children: const [
              Issue1(),
              // Issue2(),
            ],
          ),
        ),
      ),
    );
  }
}

class Issue1 extends StatelessWidget {
  const Issue1({super.key});

  @override
  Widget build(BuildContext context) {
    return Padding(
      padding: const EdgeInsets.all(16.0),
      child: Row(
        children: const [
          Icon(Icons.waving_hand_sharp, color: Colors.blue),
          SizedBox(width: 8.0),
          Text(
            'Hello GDSC PTIT! Flutter is so awesome and everyone can also build an app! Start learning today and show yourself!',
          ),
        ],
      ),
    );
  }
}

class Issue2 extends StatelessWidget {
  const Issue2({super.key});

  @override
  Widget build(BuildContext context) {
    return ListView.builder(
      itemCount: 20,
      itemBuilder: (context, index) => ListTile(
        leading: const Icon(Icons.adb),
        title: Padding(
          padding: const EdgeInsets.all(8.0),
          child: Text('Hello $index'),
        ),
      ),
    );
  }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment