Skip to content
Open
Show file tree
Hide file tree
Changes from all 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
25 changes: 25 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "DayToDay",
"request": "launch",
"type": "dart"
},
{
"name": "DayToDay (profile mode)",
"request": "launch",
"type": "dart",
"flutterMode": "profile"
},
{
"name": "DayToDay (release mode)",
"request": "launch",
"type": "dart",
"flutterMode": "release"
}
]
}
2 changes: 1 addition & 1 deletion android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ android {
defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "com.example.day_to_day"
minSdkVersion 19
minSdkVersion 21
targetSdkVersion flutter.targetSdkVersion
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
Expand Down
Binary file added assets/icons/dayToDayLogo.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/icons/dtdLogo1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/icons/dtdLogo2.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
85 changes: 85 additions & 0 deletions lib/assignments.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
import 'package:flutter/material.dart';
import 'event_form.dart';
import 'globals.dart' as globals;
import 'events.dart';

class AssignmentsWidget extends StatefulWidget {
List<Events> hw = [];
AssignmentsWidget({Key? key, required this.stream}) : super(key: key);
final Stream<bool> stream;

@override
State<AssignmentsWidget> createState() => AssignmentsState();
}

class AssignmentsState extends State<AssignmentsWidget> {
int count = 2;

@override
void initState() {

widget.stream.listen((event) {
setState(() {

});
});
super.initState();
}

@override
Widget build(BuildContext context) {
widget.hw = [];
globals.eventsList.forEach((key, value) {
for (int i = 0; i < value.length; i++) {
if (value[i].type.contains("assign")) {
widget.hw.add(value[i]);
}
}
});
return Scaffold(
appBar: AppBar(
title: const Center(child: Text("Assignments List")),
backgroundColor: const Color.fromARGB(255, 255, 82, 82),
),
body: ListView.builder(
itemCount: widget.hw.length,
itemBuilder: (BuildContext context, int index) {
return Card(
child: CheckboxListTile(
dense: true,
activeColor: Colors.red[400],
controlAffinity: ListTileControlAffinity.leading,
value: false,
onChanged: (value) {
setState(() {
widget.hw.removeAt(index);
});
},
title: Text(
widget.hw[index].title,
style: const TextStyle(
fontWeight: FontWeight.bold,
fontSize: 20,
color: Color.fromARGB(255, 12, 12, 12)),
)));
},
),
floatingActionButton: FloatingActionButton(
onPressed: () {
setState(() {
Navigator.of(context).push(MaterialPageRoute(builder: (context) {
return EventForm();
}));
});
setState(() {});
},
child: const Icon(
Icons.add,
size: 45,
color: Colors.white,
),
backgroundColor: Colors.blueGrey,
),
);
}
}
Loading