-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
94eddb6
commit de7a090
Showing
7 changed files
with
182 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
import 'package:flutter/material.dart'; | ||
import 'package:tournament_creator/screens/addNotes/create_notes.dart'; | ||
//import 'package:tournament_creator/screens/addNotes/create_notes.dart'; | ||
import 'package:tournament_creator/screens/create_tounament/reuse_widgets/reuse_widgets.dart'; | ||
|
||
// ignore: must_be_immutable | ||
class AddNotes extends StatefulWidget { | ||
AddNotes({super.key}); | ||
|
||
@override | ||
State<AddNotes> createState() => _AddNotesState(); | ||
} | ||
|
||
class _AddNotesState extends State<AddNotes> { | ||
TextEditingController titleController = TextEditingController(); | ||
|
||
TextEditingController contentController = TextEditingController(); | ||
Future <void>createNote(Map<String,dynamic>newNote)async{ | ||
|
||
} | ||
@override | ||
Widget build(BuildContext context) { | ||
return Scaffold( | ||
appBar: appbardecorations(name: 'Notes '), | ||
backgroundColor: Colors.yellow[100], | ||
floatingActionButton: Padding( | ||
padding: const EdgeInsets.all(8.0), | ||
child: FloatingActionButton( | ||
child: Icon(Icons.add), | ||
backgroundColor: Colors.teal, | ||
onPressed: () { | ||
Navigator.push( | ||
context, | ||
MaterialPageRoute( | ||
builder: (context) => CreateNotes())); | ||
}), | ||
), | ||
); | ||
} | ||
|
||
// showForm(BuildContext ctx, int? iteamkey) async { | ||
// showModalBottomSheet( | ||
// context: ctx, | ||
// builder: (_) { | ||
// return Container( | ||
// padding: EdgeInsets.only( | ||
// bottom: MediaQuery.of(ctx).viewInsets.bottom, | ||
// top: 15, | ||
// left: 15, | ||
// right: 15), | ||
// child: Column( | ||
// mainAxisSize: MainAxisSize.min, | ||
// crossAxisAlignment: CrossAxisAlignment.end, | ||
// children: [ | ||
// TextField( | ||
// controller: titleController, | ||
// decoration: InputDecoration(hintText: 'Title'), | ||
// ), | ||
// sizedbox10(), | ||
// TextField( | ||
// controller: contentController, | ||
// decoration: InputDecoration(hintText: 'Type here....'), | ||
// ),sizedbox10(), | ||
// ElevatedButton(onPressed: ()async{ | ||
// createNote({'title':titleController,'content':contentController}); | ||
// titleController.clear(); | ||
// contentController.clear(); | ||
// Navigator.of(ctx).pop(); | ||
// }, | ||
// child: Text('Save')) | ||
// ], | ||
// ), | ||
// ); | ||
// }); | ||
// } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
import 'package:flutter/material.dart'; | ||
import 'package:tournament_creator/screens/create_tounament/reuse_widgets/reuse_widgets.dart'; | ||
|
||
class CreateNotes extends StatelessWidget { | ||
CreateNotes({super.key}); | ||
String? title; | ||
String? note; | ||
final titleController = TextEditingController(); | ||
final noteController = TextEditingController(); | ||
@override | ||
Widget build(BuildContext context) { | ||
return Scaffold( | ||
appBar: appbardecorations( | ||
name: "Create Notes", | ||
), | ||
backgroundColor: Colors.yellow[100], | ||
body: Padding( | ||
padding: const EdgeInsets.all(8.0), | ||
child: SingleChildScrollView( | ||
child: Column(children: [ | ||
sizedbox10(), | ||
Container( | ||
height: 620, | ||
width: 380, | ||
decoration: BoxDecoration( | ||
// color: Colors.amber[100], | ||
border: Border.all(width: 3, color: Colors.grey), | ||
borderRadius: BorderRadius.circular(10)), | ||
child: Padding( | ||
padding: const EdgeInsets.all(8.0), | ||
child: Column( | ||
children: [ | ||
TextField( | ||
controller: titleController, | ||
style: TextStyle(fontSize: 30), | ||
maxLines: null, | ||
decoration: InputDecoration( | ||
hintText: 'Title', | ||
hintStyle: const TextStyle(fontSize: 30), | ||
border: OutlineInputBorder( | ||
borderRadius: BorderRadius.circular(10), | ||
borderSide: BorderSide.none)), | ||
), | ||
TextField( | ||
controller: noteController, | ||
style: TextStyle(fontSize: 20), | ||
maxLines: null, | ||
decoration: InputDecoration( | ||
hintText: 'Add Notes Here.....', | ||
hintStyle: TextStyle(fontSize: 20), | ||
border: OutlineInputBorder( | ||
borderSide: BorderSide.none)), | ||
), | ||
], | ||
), | ||
)), | ||
SizedBox( | ||
height: 40, | ||
), | ||
InkWell( | ||
onTap: (){ | ||
|
||
}, | ||
child: Container( | ||
height: 70, | ||
width: 330, | ||
decoration: BoxDecoration( | ||
color: Colors.teal, borderRadius: BorderRadius.circular(35)), | ||
child: Center(child: Text('Save',style: TextStyle(color: Colors.white,fontSize: 22,fontWeight: FontWeight.bold ),)), | ||
), | ||
) | ||
]), | ||
), | ||
), | ||
); | ||
} | ||
savedata(){ | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters