Skip to content
Open
Show file tree
Hide file tree
Changes from 10 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 4 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,22 +13,13 @@ Browse through a variety of widgets used in flutter and learn how to use them
<img alt="made-by-acm" src="https://img.shields.io/badge/MADE%20BY-ACM%20VIT-blue?style=for-the-badge" />
</a>
<img alt="license" src="https://img.shields.io/badge/License-MIT-green.svg?style=for-the-badge" />
<img alt="Awesome Flutter" src="https://img.shields.io/badge/Awesome-Flutter-22a6b3.svg?style=for-the-badge" />
</p>

<p align="center">Project Status</p>
<img alt="Awesome Flutter" src="https://img.shields.io/badge/Awesome-Flutter-9cf.svg?style=for-the-badge" />

<p align = "center">
<img alt="stars" src="https://img.shields.io/github/stars/ACM-VIT/fludget?color=eb4d4b&style=for-the-badge" />
<img alt="forks" src="https://img.shields.io/github/forks/ACM-VIT/fludget?color=7ed6df&style=for-the-badge" />
<img alt="issuses" src="https://img.shields.io/github/issues/ACM-VIT/fludget?color=f9ca24&style=for-the-badge" />
<img alt="prs" src="https://img.shields.io/github/issues-pr-closed/ACM-VIT/fludget?color=686de0&style=for-the-badge" />
</p>

---

<p>

This application is developed to learn Flutter using Flutter. Different widgets used in Flutter can be viewed in this app along with their implementation, description and code. If you like our work, ⭐ the repository to show support.


Expand Down Expand Up @@ -69,7 +60,6 @@ This application is developed to learn Flutter using Flutter. Different widgets




<div <table><tr1>
<img src="https://user-images.githubusercontent.com/63790391/138469895-6800e91f-a9f2-44be-ab64-d2c0243f6dee.jpeg"width="200">
<img src="https://user-images.githubusercontent.com/63790391/138469903-2a6817ef-3252-4675-b674-f331d579d73d.jpeg"width="200">
Expand Down Expand Up @@ -106,12 +96,9 @@ Note: Make sure you are always up to date with sync and pull upstream. Sync and
- Add an argument `link` and include link to the official documentation of the widget as the parameter
- Add an argument `category` and include category of the widget as the parameter

# Contributors

<p align = "left">
<img alt="contributors" src="https://badges.pufler.dev/contributors/ACM-VIT/fludget?size=60&padding=10&bots=False" />
</p>

# Authors

- [Aryan Khubchandani](https://github.com/AryanKhubchandani)
- [Aryan Khubchandani](https://github.com/AryanKhubchandani)


3 changes: 2 additions & 1 deletion lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ void main() {
class MyApp extends StatefulWidget {
@override
State<StatefulWidget> createState() => _MyAppState();

}

class _MyAppState extends State<MyApp> {
ThemeProvider themeChangeProvider = new ThemeProvider();

@override
void initState() {
super.initState();
Expand All @@ -36,6 +36,7 @@ class _MyAppState extends State<MyApp> {
child: Consumer<ThemeProvider>(
builder: (BuildContext context, value, Widget? child) {
return MaterialApp(
debugShowCheckedModeBanner: false,
title: 'Fludget',
theme: ThemeFactory.getTheme(themeChangeProvider.themeMode),
home: SplashScreen(),
Expand Down
100 changes: 100 additions & 0 deletions lib/routes/switchlist_tile.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
import 'package:fludget/Models/codeString.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
class SwitchListTileWidget extends StatefulWidget {
const SwitchListTileWidget({Key? key}) : super(key: key);

@override
_SwitchListTileWidgetState createState() => _SwitchListTileWidgetState();
}

class _SwitchListTileWidgetState extends State<SwitchListTileWidget> {
bool _flutter = false;
@override
Widget build(BuildContext context) {

return Container(
padding:EdgeInsets.only(left: 10,right: 10,top: 10) ,
alignment: Alignment.topCenter,
child: Card(
color: Colors.white,
child: SwitchListTile(
title: Text('Fludget',style: TextStyle(
color: Colors.blue,
fontWeight: FontWeight.w800,
fontSize: 20
),
),
value: _flutter,
activeColor: Colors.red,
inactiveTrackColor: Colors.grey,
onChanged: (bool value) {
setState(() {
_flutter = value;
});
},
// secondary: Image.asset("assets/devs.jpg",),
subtitle: Text('HacktoberFest 2021',style: TextStyle(
color: Colors.blueGrey[600],
),
),
controlAffinity: ListTileControlAffinity.trailing,
),
),
);
}
}



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

@override
Widget build(BuildContext context) {
return SingleChildScrollView(
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Container(
margin: EdgeInsets.all(10),
alignment: Alignment.center,
child: Text(
'SwitchListTile is a widget that wraps a ListTile and a Switch. It iss usually used as a child of a ListView where the content has a Switch widget. A common usage is for displaying an item in a setting page where the user can toggle a particular setting on and off. '
,style: TextStyle(fontSize: 20),
),
),
),
);
}
}


class SwitchListTileCode extends CodeString {
const SwitchListTileCode();
@override
String buildCodeString() {
return """ SwitchListTile(
title: Text('Fludget',style: TextStyle(
color: Colors.blue,
fontWeight: FontWeight.w800,
fontSize: 20
),
),
value: _flutter,
activeColor: Colors.red,
inactiveTrackColor: Colors.grey,
onChanged: (bool value) {
setState(() {
_flutter = value;
});
},
subtitle: Text('HacktoberFest 2021',
style: TextStyle(
color: Colors.blueGrey[600],
),
),
controlAffinity: ListTileControlAffinity.trailing,
),
""";
}
}
12 changes: 12 additions & 0 deletions lib/widgetList.dart
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ import 'package:fludget/routes/spacer.dart';
import 'package:fludget/routes/stack.dart';
import 'package:fludget/routes/streamBuilder.dart';
import 'package:fludget/routes/switch.dart';
import 'package:fludget/routes/switchlist_tile.dart';
import 'package:fludget/routes/table.dart';
import 'package:fludget/routes/text.dart';
import 'package:fludget/routes/textButton.dart';
Expand All @@ -103,6 +104,7 @@ import 'package:fludget/routes/wrap.dart';
import 'package:fludget/routes/simple_dialog.dart';
import 'package:flutter/material.dart';
import 'package:fludget/routes/rotatedBox.dart';
import 'package:flutter/material.dart';
import 'Models/widgetModel.dart';
import 'routes/autoComplete.dart';
import 'routes/BottomNavigationBar.dart';
Expand Down Expand Up @@ -352,6 +354,14 @@ const List<WidgetModel> widgets = [
link: "https://api.flutter.dev/flutter/widgets/Wrap-class.html",
category: [WidgetCategoy.Layout],
codeString: WrapCode()),
WidgetModel(
name: "SwitchList Tile ",
subtitle: "SwitchList Tile Widget",
implementation: SwitchListTileWidget(),
description: SwitchListTileDescription(),
link: "https://api.flutter.dev/flutter/material/SwitchListTile-class.html",
category: [WidgetCategoy.Layout],
codeString:SwitchListTileCode()),
WidgetModel(
name: "Hero",
subtitle: "Hero Animation between widgets",
Expand Down Expand Up @@ -1016,3 +1026,5 @@ const List<WidgetModel> widgets = [
category: [WidgetCategoy.Material, WidgetCategoy.Basics],
)
];