split into frontend and backend
This commit is contained in:
55
frontend/lib/modules/profile.dart
Normal file
55
frontend/lib/modules/profile.dart
Normal file
@@ -0,0 +1,55 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
|
||||
|
||||
class ProfilePage extends StatefulWidget {
|
||||
@override
|
||||
_ProfilePageState createState() => _ProfilePageState();
|
||||
}
|
||||
|
||||
class _ProfilePageState extends State<ProfilePage> {
|
||||
|
||||
double value = 0.0;
|
||||
void onChanged(double newValue) {
|
||||
setState(() {
|
||||
value = newValue;
|
||||
});
|
||||
}
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
title: Text('Profile'),
|
||||
),
|
||||
body: Padding(
|
||||
padding: EdgeInsets.all(8.0),
|
||||
child: Column(
|
||||
children: <Widget>[
|
||||
Card(
|
||||
child: ListTile(
|
||||
leading: Icon(Icons.notifications_sharp),
|
||||
title: Text('Notification 1'),
|
||||
subtitle: Text('This is a first notification'),
|
||||
),
|
||||
),
|
||||
Card(
|
||||
child: ListTile(
|
||||
leading: Icon(Icons.notifications_sharp),
|
||||
title: Text('Notification 2'),
|
||||
subtitle: Text('This is a notification'),
|
||||
),
|
||||
),
|
||||
Card(
|
||||
child: ListTile(
|
||||
leading: Icon(Icons.outdoor_grill),
|
||||
title: Text("Eating preference"),
|
||||
subtitle: Slider.adaptive(value: value, onChanged: onChanged, min: 0, max: 5, divisions: 5, label: value.toInt().toString(),)
|
||||
|
||||
)
|
||||
)
|
||||
],
|
||||
),
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user