Skip to content

Commit

Permalink
APPBAR
Browse files Browse the repository at this point in the history
APPBAR
  • Loading branch information
Isira-Udantha committed Feb 2, 2024
1 parent c1015f5 commit fe69a4f
Showing 1 changed file with 160 additions and 27 deletions.
187 changes: 160 additions & 27 deletions code/smartchessboard/lib/screens/user_guide.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,20 @@ class UserGuide extends StatelessWidget {
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: const Text("Chess Game User Guide"),
backgroundColor:
const Color.fromARGB(255, 170, 143, 217), // Thematic color
// title: Text("Chess Game User Guide",style: TextStyle(color: Colors.red),),
// backgroundColor: Color.fromARGB(255, 88, 189, 230), // Thematic color
flexibleSpace: Image.asset("assets/appbar2.png", fit: BoxFit.cover,
),
shadowColor: Color.fromARGB(255, 11, 11, 11),
// bottom:
// const TabBar(
// tabs: [
// Tab(icon: Icon(Icons.directions_car), text: ("Tab1"),),
// Tab(icon: Icon(Icons.directions_transit)),
// Tab(icon: Icon(Icons.directions_bike)),
// ],
// ),
elevation: 100.0,
),
body: const Padding(
padding: EdgeInsets.all(16.0),
Expand All @@ -23,54 +34,59 @@ class UserGuide extends StatelessWidget {
style: TextStyle(
fontSize: 24,
fontWeight: FontWeight.bold,
color: Colors.black, // Thematic color
color: Color.fromARGB(255, 6, 6, 6), // Thematic color
),
),
SizedBox(height: 16),
UserGuideSection(
title: 'Overview',
content:
'Congratulations on choosing our chess app, where the timeless game of strategy meets cutting-edge technology. We\'ve taken chess to the next level by connecting it to a real chessboard through Bluetooth, providing you with a seamless and immersive experience. To make the most out of your chess journey, we\'ve created this user guide to help you navigate through the features and enjoy every move on and off the board.',
content: StyledContent_1(),
),
UserGuideSection(
title: 'Getting Started',
content:
'Connecting your real chessboard via Bluetooth\nSetting up the app for the first time\nOverview of the app interface',
content: StyledContent_2(),
),
UserGuideSection(
title: 'Basic Gameplay',
content:
'Making moves on the virtual board\nSyncing moves with the physical chessboard\nUnderstanding feedback and notifications',
content: Text(
'Making moves on the virtual board\nSyncing moves with the physical chessboard\nUnderstanding feedback and notifications',
),
),
UserGuideSection(
title: 'Bluetooth Connectivity',
content:
'Troubleshooting connection issues\nReconnecting your chessboard\nTips for optimal Bluetooth performance',
content: Text(
'Troubleshooting connection issues\nReconnecting your chessboard\nTips for optimal Bluetooth performance',
),
),
UserGuideSection(
title: 'App Features',
content:
'Exploring different game modes\nCustomizing the chessboard appearance\nAccessing game history and saved games',
content: Text(
'Exploring different game modes\nCustomizing the chessboard appearance\nAccessing game history and saved games',
),
),
UserGuideSection(
title: 'In-Game Assistance',
content:
'Utilizing hints and analysis tools\nAdjusting difficulty levels\nResuming interrupted games',
),
UserGuideSection(
title: 'Flutter App Integration',
content:
'Navigating through the app\'s various screens\nAccessing additional resources and settings\nProviding feedback and support',
content: Text(
'Utilizing hints and analysis tools\nAdjusting difficulty levels\nResuming interrupted games',
),
),
// UserGuideSection(
// title: 'Flutter App Integration',
// content: Text(
// 'Navigating through the app\'s various screens\nAccessing additional resources and settings\nProviding feedback and support',
// ),
// ),
UserGuideSection(
title: 'Chessboard Maintenance',
content:
'Cleaning and caring for your real chessboard\nBattery management for Bluetooth connectivity\nStorage and travel tips',
content: Text(
'Cleaning and caring for your real chessboard\nBattery management for Bluetooth connectivity\nStorage and travel tips',
),
),
UserGuideSection(
title: 'Frequently Asked Questions',
content:
'Answers to common queries\nTroubleshooting tips\nContacting our support team',
content: Text(
'Answers to common queries\nTroubleshooting tips\nContacting our support team',
),
),
SizedBox(height: 16),
Text(
Expand All @@ -90,7 +106,7 @@ class UserGuide extends StatelessWidget {

class UserGuideSection extends StatelessWidget {
final String title;
final String content;
final Widget content;

const UserGuideSection({
Key? key,
Expand All @@ -112,9 +128,126 @@ class UserGuideSection extends StatelessWidget {
children: <Widget>[
Padding(
padding: const EdgeInsets.all(8.0),
child: Text(content),
child: content,
),
],
);
}
}

// ignore: camel_case_types
class StyledContent_1 extends StatelessWidget {
const StyledContent_1({super.key});

@override
Widget build(BuildContext context) {
return RichText(
text: const TextSpan(
children: [
TextSpan(
text: 'Congratulations on choosing our chess app, ',
style: TextStyle(
fontSize: 16,
fontWeight: FontWeight.bold,
color: Color.fromARGB(255, 189, 47, 8),
),
),
TextSpan(
text: 'where the timeless game of strategy meets cutting-edge technology. ',
style: TextStyle(
fontSize: 16,
fontStyle: FontStyle.italic,
color: Colors.black87,
),
),
TextSpan(
text: 'We\'ve taken chess to the next level by connecting it to a real chessboard through Bluetooth, ',
style: TextStyle(
fontSize: 16,
fontWeight: FontWeight.normal,
color: Colors.black87,
),
),
TextSpan(
text: 'providing you with a seamless and immersive experience. ',
style: TextStyle(
fontSize: 16,
fontWeight: FontWeight.bold,
color: Colors.deepPurple,
),
),
TextSpan(
text: 'To make the most out of your chess journey, we\'ve created this user guide to help you navigate through the features and enjoy every move on and off the board.',
style: TextStyle(
fontSize: 16,
fontWeight: FontWeight.normal,
color: Colors.black87,
),
),
],
),
);
}
}

class StyledContent_2 extends StatelessWidget {
const StyledContent_2({super.key});

@override
Widget build(BuildContext context) {
return RichText(
text: const TextSpan(
children: [
TextSpan(
text: 'Connecting the app via bluetooth \n\n',
style: TextStyle(
fontSize: 16,
fontWeight: FontWeight.bold,
color: Color.fromARGB(255, 189, 47, 8),
),
),
TextSpan(
text: 'where the timeless game of strategy meets cutting-edge technology. \n',
style: TextStyle(
fontSize: 16,
fontStyle: FontStyle.italic,
color: Colors.black87,
),
),
TextSpan(
text: 'Setting the mobile app for the first time \n\n',
style: TextStyle(
fontSize: 16,
fontWeight: FontWeight.bold,
color: Color.fromARGB(255, 189, 47, 8),
),
),
TextSpan(
text: 'We\'ve taken chess to the next level by connecting it to a real chessboard through Bluetooth, \n',
style: TextStyle(
fontSize: 16,
fontWeight: FontWeight.normal,
color: Colors.black87,
),
),
TextSpan(
text: 'Quick move through app \n\n',
style: TextStyle(
fontSize: 16,
fontWeight: FontWeight.bold,
color: Color.fromARGB(255, 189, 47, 8),
),
),
TextSpan(
text: 'To make the most out of your chess journey, we\'ve created this user guide to help you navigate through the features and enjoy every move on and off the board.',
style: TextStyle(
fontSize: 16,
fontWeight: FontWeight.normal,
color: Colors.black87,
),
),
],
),
);
}
}

0 comments on commit fe69a4f

Please sign in to comment.