Skip to content

App-Development-Academy/ExpandableWidgetFlutter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation


Logo

Mobile Apps Academy

One stop solution for all mobile app development
Explore

About The Project

Product Name Screen Shot

A expandable widget, Developed using Flutter.

(back to top)

Built With

  • Flutter

(back to top)

Getting Started

Prerequisites

  • Android Studio or Visual Studio Code

Installation

  1. Clone the repo
git clone https://github.com/Mobile-Apps-Academy/ExpandableWidgetFlutter.git

Usage

  1. How to use the widget
class MyApp extends StatelessWidget {
  const MyApp({super.key});

  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      debugShowCheckedModeBanner: false,
      home: Scaffold(
        backgroundColor: Colors.amberAccent,
        body: SafeArea(
          child: Padding(
            padding: EdgeInsets.all(4),
            child: ExpandableWidget(
              header: expandableHeader(),
              child:  expandableChild(),
            ),
          ),
        ),
      ),
    );
  }

  Widget expandableHeader() {
    return Container(
        height: 60,
        width: double.infinity,
        alignment: Alignment.center,
        decoration:  BoxDecoration(
            borderRadius: BorderRadius.circular(15),
            color: Colors.black// Adjust the radius as needed
        ),
        child: Text('Mobile Apps Academy', style: TextStyle(fontSize: 18, fontWeight: FontWeight.bold, color: Colors.white),)
    );
  }

  Widget expandableChild() {
    return Container(
        height: 160,
        width: double.infinity,
        alignment: Alignment.center,
        decoration: BoxDecoration(
            borderRadius: BorderRadius.circular(15),
            color: Colors.black // Adjust the radius as needed
        ),
        child: const Padding (
          padding: EdgeInsets.all(10),
          child: Column(
            mainAxisAlignment: MainAxisAlignment.start,
            crossAxisAlignment: CrossAxisAlignment.start,
            children: [
              Text('Mobile Apps Academy', style: TextStyle(fontSize: 28,
                  fontWeight: FontWeight.bold,
                  color: Colors.white),),
              Divider(),
              Text(
                  'Welcome to Mobile Apps Academy, your go-to channel for all things mobile app development!',
                  style: TextStyle(fontSize: 18, color: Colors.white))
            ],
          ),
        )
    );
  }

}

(back to top)

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

(back to top)

License

Distributed under the MIT License. See LICENSE.txt for more information.

(back to top)

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages