-
Notifications
You must be signed in to change notification settings - Fork 2
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
ef7c4ee
commit 7df5e05
Showing
8 changed files
with
454 additions
and
318 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,66 +1,66 @@ | ||
import 'package:flutter/material.dart'; | ||
import 'package:yogzen/global/color.dart'; | ||
import 'package:yogzen/openAI/open_AI.dart'; | ||
// import 'package:flutter/material.dart'; | ||
// import 'package:yogzen/global/color.dart'; | ||
// import 'package:yogzen/openAI/open_AI.dart'; | ||
|
||
|
||
class HexagonClipper extends CustomClipper<Path> { | ||
@override | ||
Path getClip(Size size) { | ||
final path = Path(); | ||
// class HexagonClipper extends CustomClipper<Path> { | ||
// @override | ||
// Path getClip(Size size) { | ||
// final path = Path(); | ||
|
||
double h = size.height; | ||
double w = size.width; | ||
// double h = size.height; | ||
// double w = size.width; | ||
|
||
path.moveTo(w / 2, 0); | ||
path.lineTo(w, h / 4); | ||
path.lineTo(w, 3 * h / 4); | ||
path.lineTo(w / 2, h); | ||
path.lineTo(0, 3 * h / 4); | ||
path.lineTo(0, h / 4); | ||
path.close(); | ||
// path.moveTo(w / 2, 0); | ||
// path.lineTo(w, h / 4); | ||
// path.lineTo(w, 3 * h / 4); | ||
// path.lineTo(w / 2, h); | ||
// path.lineTo(0, 3 * h / 4); | ||
// path.lineTo(0, h / 4); | ||
// path.close(); | ||
|
||
return path; | ||
} | ||
// return path; | ||
// } | ||
|
||
@override | ||
bool shouldReclip(CustomClipper<Path> oldClipper) { | ||
return false; | ||
} | ||
} | ||
// @override | ||
// bool shouldReclip(CustomClipper<Path> oldClipper) { | ||
// return false; | ||
// } | ||
// } | ||
|
||
class HexagonWidget extends StatelessWidget { | ||
// final ImagePicker _picker = ImagePicker(); | ||
// Future<void> _openCamera() async { | ||
// final pickedFile = await _picker.pickImage(source: ImageSource.camera); | ||
// } | ||
// class HexagonWidget extends StatelessWidget { | ||
// // final ImagePicker _picker = ImagePicker(); | ||
// // Future<void> _openCamera() async { | ||
// // final pickedFile = await _picker.pickImage(source: ImageSource.camera); | ||
// // } | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
return ClipPath( | ||
clipper: HexagonClipper(), | ||
child: Container( | ||
decoration: BoxDecoration( | ||
color: kdarkBlue, | ||
boxShadow: [ | ||
const BoxShadow( | ||
offset: Offset(0, 4), blurRadius: 4, color: Colors.black12), | ||
], | ||
), | ||
height: 68, // Set the height of your hexagon here | ||
child: IconButton( | ||
// onPressed: () async { | ||
// List<String> l= await fetchYogaPose("TadaAsan"); | ||
// print(l); | ||
// }, | ||
onPressed: () { | ||
// @override | ||
// Widget build(BuildContext context) { | ||
// return ClipPath( | ||
// clipper: HexagonClipper(), | ||
// child: Container( | ||
// decoration: BoxDecoration( | ||
// color: kdarkBlue, | ||
// boxShadow: [ | ||
// const BoxShadow( | ||
// offset: Offset(0, 4), blurRadius: 4, color: Colors.black12), | ||
// ], | ||
// ), | ||
// height: 68, // Set the height of your hexagon here | ||
// child: IconButton( | ||
// // onPressed: () async { | ||
// // List<String> l= await fetchYogaPose("TadaAsan"); | ||
// // print(l); | ||
// // }, | ||
// onPressed: () { | ||
|
||
}, | ||
icon: const Icon( | ||
Icons.camera, | ||
color: Colors.white, | ||
), | ||
), | ||
), | ||
); | ||
} | ||
} | ||
// }, | ||
// icon: const Icon( | ||
// Icons.camera, | ||
// color: Colors.white, | ||
// ), | ||
// ), | ||
// ), | ||
// ); | ||
// } | ||
// } |
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 |
---|---|---|
@@ -1,90 +1,85 @@ | ||
import 'package:flutter/material.dart'; | ||
// import 'package:flutter/material.dart'; | ||
|
||
import '../../global/color.dart'; | ||
import './hexagon.dart'; | ||
// import '../../global/color.dart'; | ||
// import './hexagon.dart'; | ||
|
||
class NavBar extends StatefulWidget { | ||
final int idx; | ||
final Function change; | ||
const NavBar({ | ||
Key? key, | ||
required this.idx, | ||
required this.change, | ||
}) : super(key: key); | ||
// class NavBar extends StatefulWidget { | ||
// final int idx; | ||
// final Function change; | ||
// const NavBar({ | ||
// Key? key, | ||
// required this.idx, | ||
// required this.change, | ||
// }) : super(key: key); | ||
|
||
@override | ||
State<NavBar> createState() => _NavBarState(); | ||
} | ||
// @override | ||
// State<NavBar> createState() => _NavBarState(); | ||
// } | ||
|
||
class _NavBarState extends State<NavBar> { | ||
@override | ||
Widget build(BuildContext context) { | ||
final width = MediaQuery.of(context).size.width; | ||
return Stack( | ||
clipBehavior: Clip.none, | ||
children: [ | ||
Container( | ||
decoration: BoxDecoration( | ||
color: Colors.white, | ||
boxShadow: [ | ||
BoxShadow( | ||
blurRadius: 10, | ||
offset: Offset(2, -4), | ||
color: Colors.black12, | ||
), | ||
], | ||
), | ||
width: width, | ||
padding: EdgeInsets.fromLTRB(16, 4, 16, 8), | ||
child: Row( | ||
mainAxisAlignment: MainAxisAlignment.spaceAround, | ||
children: [ | ||
IconButton( | ||
onPressed: () => widget.change(0), | ||
icon: Icon( | ||
Icons.home_rounded, | ||
size: 30, | ||
color: widget.idx == 0 | ||
? kdarkBlue | ||
: kblackSubHeading.withOpacity(0.3), | ||
), | ||
), | ||
SizedBox( | ||
width: 60, | ||
), | ||
IconButton( | ||
onPressed: () => widget.change(1), | ||
icon: Icon( | ||
Icons.health_and_safety, | ||
size: 30, | ||
color: widget.idx == 1 | ||
? kdarkBlue | ||
: kblackSubHeading.withOpacity(0.3), | ||
), | ||
), | ||
SizedBox( | ||
width: 60, | ||
), | ||
IconButton( | ||
onPressed: () => widget.change(2), | ||
icon: Icon( | ||
Icons.person, | ||
size: 30, | ||
color: widget.idx == 2 | ||
? kdarkBlue | ||
: kblackSubHeading.withOpacity(0.3), | ||
), | ||
), | ||
], | ||
), | ||
), | ||
// Positioned( | ||
// child: HexagonWidget(), | ||
// top: -30, | ||
// left: width / 2 - 30, | ||
// right: width / 2 - 30, | ||
// ) | ||
], | ||
); | ||
} | ||
} | ||
// class _NavBarState extends State<NavBar> { | ||
// @override | ||
// Widget build(BuildContext context) { | ||
// final width = MediaQuery.of(context).size.width; | ||
// return Stack( | ||
// clipBehavior: Clip.none, | ||
// children: [ | ||
// Container( | ||
// decoration: BoxDecoration( | ||
// color: Colors.white, | ||
// boxShadow: [ | ||
// BoxShadow( | ||
// blurRadius: 10, | ||
// offset: Offset(2, -4), | ||
// color: Colors.black12, | ||
// ), | ||
// ], | ||
// ), | ||
// width: width, | ||
// padding: EdgeInsets.fromLTRB(16, 4, 16, 8), | ||
// child: Row( | ||
// mainAxisAlignment: MainAxisAlignment.spaceAround, | ||
// children: [ | ||
// IconButton( | ||
// onPressed: () => widget.change(0), | ||
// icon: Icon( | ||
// Icons.home_rounded, | ||
// size: 30, | ||
// color: widget.idx == 0 | ||
// ? kdarkBlue | ||
// : kblackSubHeading.withOpacity(0.3), | ||
// ), | ||
// ), | ||
// SizedBox( | ||
// width: 60, | ||
// ), | ||
// IconButton( | ||
// onPressed: () => widget.change(1), | ||
// icon: Icon( | ||
// Icons.health_and_safety, | ||
// size: 30, | ||
// color: widget.idx == 1 | ||
// ? kdarkBlue | ||
// : kblackSubHeading.withOpacity(0.3), | ||
// ), | ||
// ), | ||
// SizedBox( | ||
// width: 60, | ||
// ), | ||
// IconButton( | ||
// onPressed: () => widget.change(2), | ||
// icon: Icon( | ||
// Icons.person, | ||
// size: 30, | ||
// color: widget.idx == 2 | ||
// ? kdarkBlue | ||
// : kblackSubHeading.withOpacity(0.3), | ||
// ), | ||
// ), | ||
// ], | ||
// ), | ||
// ), | ||
|
||
// ], | ||
// ); | ||
// } | ||
// } |
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
Oops, something went wrong.