Skip to content

Commit

Permalink
Merge branch 'feature_uff' into 'master'
Browse files Browse the repository at this point in the history
feature_uff

See merge request domib97/notes_app2!5
  • Loading branch information
domib97 committed May 16, 2024
2 parents 09a3622 + 106a766 commit 9f48435
Show file tree
Hide file tree
Showing 4 changed files with 71 additions and 19 deletions.
15 changes: 0 additions & 15 deletions lib/inbox.dart

This file was deleted.

62 changes: 62 additions & 0 deletions lib/inbox_page.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
import 'package:flutter/material.dart';
import 'package:flutter_animate/flutter_animate.dart';

void main() {
runApp(MyApp());
}

class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Inbox',
theme: ThemeData(
primarySwatch: Colors.green,
),
home: InboxPage(),
);
}
}

class InboxPage extends StatefulWidget {
@override
_InboxPageState createState() => _InboxPageState();
const InboxPage({super.key});
}

class _InboxPageState extends State<InboxPage> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text('Inbox'),
centerTitle: true,
),
body: DefaultTabController(
length: 3,
child: Column(
children: <Widget>[
const TabBar(
indicatorColor: Colors.green,
labelColor: Colors.green,
tabs: [
Tab(text: 'A'),
Tab(text: 'B'),
Tab(text: 'C'),
],
),
Expanded(
child: TabBarView(
children: [
Center(child: const Text('Content A', style: TextStyle(fontSize: 24)).animate().fade().scale().tint(color: Colors.pink)),
Center(child: const Text('Content B', style: TextStyle(fontSize: 24)).animate().fade().scale().tint(color: Colors.cyanAccent)),
Center(child: const Text('Content C', style: TextStyle(fontSize: 24)).animate().fade().scale().tint(color: Colors.greenAccent)),
],
),
),
],
),
),
);
}
}
4 changes: 2 additions & 2 deletions lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import 'package:flutter/material.dart';
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
import 'note_page.dart';
import 'chat_page.dart';
import 'inbox.dart';
import 'inbox_page.dart';
import 'settings_page.dart';

void main() {
Expand All @@ -21,7 +21,7 @@ class _MyAppState extends State<MyApp> {
static final List<Widget> _widgetOptions = [
const NotePage(),
const ChatScreen(),
const NotificationsPage(),
const InboxPage(),
const SettingsPage(),
];

Expand Down
9 changes: 7 additions & 2 deletions lib/settings_page.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import 'package:flutter/material.dart';
import 'package:font_awesome_flutter/font_awesome_flutter.dart';

class SettingsPage extends StatefulWidget {
@override
Expand All @@ -10,18 +11,21 @@ class _SettingsPageState extends State<SettingsPage> {
bool _darkMode = false;
bool _notificationsEnabled = true;


@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text('Settings'),
centerTitle: true,
),
body: ListView(
children: <Widget>[
ListTile(
title: Text('Dark Mode'),
trailing: Switch(
value: _darkMode,
activeColor: Colors.green,
onChanged: (value) {
setState(() {
_darkMode = value;
Expand All @@ -33,6 +37,7 @@ class _SettingsPageState extends State<SettingsPage> {
title: Text('Notifications'),
trailing: Switch(
value: _notificationsEnabled,
activeColor: Colors.green,
onChanged: (value) {
setState(() {
_notificationsEnabled = value;
Expand All @@ -43,15 +48,15 @@ class _SettingsPageState extends State<SettingsPage> {
ListTile(
title: Text('Language'),
subtitle: Text('English'),
trailing: Icon(Icons.arrow_forward_ios),
trailing: const FaIcon(FontAwesomeIcons.angleRight),
onTap: () {
// Navigate to language selection page
},
),
ListTile(
title: Text('About'),
subtitle: Text('Version 1.0'),
trailing: Icon(Icons.info),
trailing: const FaIcon(FontAwesomeIcons.circleInfo),
onTap: () {
// Show about dialog
},
Expand Down

0 comments on commit 9f48435

Please sign in to comment.