camera and bottom nav
This commit is contained in:
parent
56d4697981
commit
5bfb381736
@ -1,7 +1,10 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
class CardList extends StatelessWidget {
|
class CardList extends StatelessWidget {
|
||||||
const CardList({super.key});
|
final String title;
|
||||||
|
final String body;
|
||||||
|
|
||||||
|
const CardList({super.key, required this.title, required this.body});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
@ -19,7 +22,7 @@ class CardList extends StatelessWidget {
|
|||||||
10.0,
|
10.0,
|
||||||
), // Opsional: membuat gambar lebih rounded
|
), // Opsional: membuat gambar lebih rounded
|
||||||
child: Image.asset(
|
child: Image.asset(
|
||||||
'assets/images/cepott.png', // Ganti dengan path gambar Anda
|
'assets/images/cepott.png',
|
||||||
width: 80, // Atur ukuran gambar
|
width: 80, // Atur ukuran gambar
|
||||||
height: 120,
|
height: 120,
|
||||||
fit: BoxFit.cover,
|
fit: BoxFit.cover,
|
||||||
@ -31,17 +34,18 @@ class CardList extends StatelessWidget {
|
|||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
"Judul Card",
|
this.title,
|
||||||
style: const TextStyle(
|
style: const TextStyle(
|
||||||
fontSize: 16,
|
fontSize: 14,
|
||||||
fontWeight: FontWeight.bold,
|
fontWeight: FontWeight.bold,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
const SizedBox(height: 5, width: 10),
|
const SizedBox(height: 1, width: 5),
|
||||||
Text(
|
Text(
|
||||||
"Deskripsi singkat tentang item ini. karena ini sangat panjang maka ini akan dipotong",
|
body,
|
||||||
style: const TextStyle(
|
style: const TextStyle(
|
||||||
fontSize: 12,
|
letterSpacing: 0.2,
|
||||||
|
fontSize: 14,
|
||||||
fontWeight: FontWeight.normal,
|
fontWeight: FontWeight.normal,
|
||||||
),
|
),
|
||||||
maxLines: 2,
|
maxLines: 2,
|
||||||
|
|||||||
@ -44,7 +44,7 @@ class _MainMenuState extends State<MainMenu> {
|
|||||||
Provider.of<MenuSelectionProvider>(context).selectedIndex;
|
Provider.of<MenuSelectionProvider>(context).selectedIndex;
|
||||||
return Container(
|
return Container(
|
||||||
color: Colors.transparent,
|
color: Colors.transparent,
|
||||||
padding: const EdgeInsets.symmetric(vertical: 10),
|
padding: const EdgeInsets.symmetric(vertical: 20, horizontal: 5),
|
||||||
child: Row(
|
child: Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_svg/svg.dart';
|
import 'package:flutter_svg/svg.dart';
|
||||||
|
import 'package:furibase/screen/camera_screen.dart';
|
||||||
|
|
||||||
class ScanButton extends StatelessWidget {
|
class ScanButton extends StatelessWidget {
|
||||||
const ScanButton({super.key});
|
const ScanButton({super.key});
|
||||||
@ -34,7 +35,12 @@ class ScanButton extends StatelessWidget {
|
|||||||
BlendMode.srcIn,
|
BlendMode.srcIn,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
onPressed: () {},
|
onPressed: () {
|
||||||
|
Navigator.push(
|
||||||
|
context,
|
||||||
|
MaterialPageRoute(builder: (context) => CameraScreen()),
|
||||||
|
);
|
||||||
|
},
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
99
lib/screen/camera_screen.dart
Normal file
99
lib/screen/camera_screen.dart
Normal file
@ -0,0 +1,99 @@
|
|||||||
|
import 'dart:io';
|
||||||
|
|
||||||
|
import 'package:camera/camera.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:permission_handler/permission_handler.dart';
|
||||||
|
|
||||||
|
class CameraScreen extends StatefulWidget {
|
||||||
|
@override
|
||||||
|
_CameraScreenState createState() => _CameraScreenState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _CameraScreenState extends State<CameraScreen> {
|
||||||
|
CameraController? controller;
|
||||||
|
List<CameraDescription>? cameras;
|
||||||
|
XFile? capturedImage;
|
||||||
|
|
||||||
|
@override
|
||||||
|
void initState() {
|
||||||
|
super.initState();
|
||||||
|
initCamera();
|
||||||
|
}
|
||||||
|
|
||||||
|
Future<void> initCamera() async {
|
||||||
|
await Permission.camera.request();
|
||||||
|
|
||||||
|
if (await Permission.camera.isGranted) {
|
||||||
|
cameras = await availableCameras();
|
||||||
|
controller = CameraController(cameras![0], ResolutionPreset.high);
|
||||||
|
|
||||||
|
await controller!.initialize();
|
||||||
|
setState(() {}); // update UI setelah kamera siap
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void dispose() {
|
||||||
|
controller?.dispose();
|
||||||
|
super.dispose();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
if (controller == null || !controller!.value.isInitialized) {
|
||||||
|
return Center(child: CircularProgressIndicator());
|
||||||
|
}
|
||||||
|
|
||||||
|
return Scaffold(
|
||||||
|
appBar: AppBar(
|
||||||
|
title: Text('Camera'),
|
||||||
|
leading: IconButton(
|
||||||
|
icon: Icon(Icons.arrow_back),
|
||||||
|
onPressed: () {
|
||||||
|
Navigator.pop(context);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
),
|
||||||
|
body: Stack(
|
||||||
|
children: [
|
||||||
|
CameraPreview(controller!),
|
||||||
|
if (capturedImage != null)
|
||||||
|
Positioned.fill(
|
||||||
|
child: Image.file(File(capturedImage!.path), fit: BoxFit.cover),
|
||||||
|
),
|
||||||
|
Align(
|
||||||
|
alignment: Alignment.bottomCenter,
|
||||||
|
child: Padding(
|
||||||
|
padding: const EdgeInsets.only(bottom: 30),
|
||||||
|
child: Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
children: [
|
||||||
|
FloatingActionButton(
|
||||||
|
backgroundColor: Colors.white,
|
||||||
|
onPressed: () async {
|
||||||
|
final image = await controller!.takePicture();
|
||||||
|
setState(() {
|
||||||
|
capturedImage = image;
|
||||||
|
});
|
||||||
|
|
||||||
|
Navigator.pop(context, capturedImage?.path);
|
||||||
|
},
|
||||||
|
child: Icon(Icons.camera_alt, color: Colors.black),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
// floatingActionButton: FloatingActionButton(
|
||||||
|
// onPressed: () async {
|
||||||
|
// final image = await controller!.takePicture();
|
||||||
|
// print('Gambar disimpan di: ${image.path}');
|
||||||
|
// // Bisa dilanjutkan untuk upload, crop, dll
|
||||||
|
// },
|
||||||
|
// child: Icon(Icons.camera_alt),
|
||||||
|
// ),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -70,10 +70,36 @@ class _ListEducationState extends State<ListEducation> {
|
|||||||
"category": "keselamatan",
|
"category": "keselamatan",
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
|
final List<Map<String, dynamic>> _listContent = [
|
||||||
|
{
|
||||||
|
"title": "Taburan Lezat untuk Nasi!",
|
||||||
|
"image": "assets/icons/healthy.svg",
|
||||||
|
"color": "#cdd0ee",
|
||||||
|
"category": "kesehatan",
|
||||||
|
"body":
|
||||||
|
"""Tahukah kamu bahwa di Jepang ada bumbu tabur yang bisa membuat nasi
|
||||||
|
menjadi lebih enak? Namanya Furikake! Kata "furikake" berasal dari bahasa Jepang, yaitu "furi"
|
||||||
|
yang berarti menaburkan dan "kake" yang berarti menuangkan. Jadi,
|
||||||
|
furikake adalah bumbu yang ditaburkan di atas nasi supaya lebih lezat!
|
||||||
|
""",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"title": "Makan Sehat dengan Gizi Seimbang",
|
||||||
|
"image": "assets/icons/Safety.svg",
|
||||||
|
"color": "#cef1da",
|
||||||
|
"category": "keselamatan",
|
||||||
|
"body":
|
||||||
|
"""upaya makan kita sehat, ada aturan "Isi Piringku" yang bisa kita ikuti:
|
||||||
|
🍽️ Separuh piring: Sayur dan buah 🍽️ Seperempat piring: Karbohidrat (seperti nasi atau roti)
|
||||||
|
🍽️ Seperempat piring: Protein (seperti ayam atau tempe) 🍽️ Sedikit lemak sehat
|
||||||
|
""",
|
||||||
|
},
|
||||||
|
];
|
||||||
List<Map<String, dynamic>> filteredCollections =
|
List<Map<String, dynamic>> filteredCollections =
|
||||||
_collections
|
_collections
|
||||||
.where(
|
.where(
|
||||||
(item) => item["label"]!.toLowerCase().contains(
|
(item) => item["label"].toLowerCase().contains(
|
||||||
_searchQuery.toLowerCase(),
|
_searchQuery.toLowerCase(),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
@ -298,10 +324,17 @@ class _ListEducationState extends State<ListEducation> {
|
|||||||
mainAxisSpacing: 10,
|
mainAxisSpacing: 10,
|
||||||
childAspectRatio: 2.5,
|
childAspectRatio: 2.5,
|
||||||
),
|
),
|
||||||
itemCount: filteredItems.length,
|
itemCount: _listContent.length,
|
||||||
itemBuilder: (context, index) {
|
itemBuilder: (context, index) {
|
||||||
return GestureDetector(
|
return GestureDetector(
|
||||||
child: CardList(),
|
child: CardList(
|
||||||
|
title:
|
||||||
|
_listContent[index]["title"] ??
|
||||||
|
"",
|
||||||
|
body:
|
||||||
|
_listContent[index]["body"] ??
|
||||||
|
"",
|
||||||
|
),
|
||||||
onTap: () {
|
onTap: () {
|
||||||
Navigator.push(
|
Navigator.push(
|
||||||
context,
|
context,
|
||||||
@ -314,7 +347,7 @@ class _ListEducationState extends State<ListEducation> {
|
|||||||
filteredItems[index],
|
filteredItems[index],
|
||||||
imagePath:
|
imagePath:
|
||||||
filteredItems[index],
|
filteredItems[index],
|
||||||
paragraphs: [
|
/* paragraphs: [
|
||||||
"""
|
"""
|
||||||
<h1>Enter the main heading, usually the same as the title.</h1>
|
<h1>Enter the main heading, usually the same as the title.</h1>
|
||||||
<p>Be <b>bold</b> in stating your key points. Put them in a list: </p>
|
<p>Be <b>bold</b> in stating your key points. Put them in a list: </p>
|
||||||
@ -329,7 +362,137 @@ class _ListEducationState extends State<ListEducation> {
|
|||||||
<p>Finally, link to <a href="page2.html">another page</a> in your own Web site.</p>
|
<p>Finally, link to <a href="page2.html">another page</a> in your own Web site.</p>
|
||||||
<p>© Wiley Publishing, 2011</p>
|
<p>© Wiley Publishing, 2011</p>
|
||||||
""",
|
""",
|
||||||
],
|
], */
|
||||||
|
paragraphs: """
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="id">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<title>Furikake: Taburan Lezat untuk Nasi!</title>
|
||||||
|
<style>
|
||||||
|
* {
|
||||||
|
box-sizing: border-box;
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
body {
|
||||||
|
font-family: 'Roboto', sans-serif;
|
||||||
|
line-height: 1.5;
|
||||||
|
color: #333;
|
||||||
|
background-color: #fff;
|
||||||
|
padding: 15px;
|
||||||
|
max-width: 100%;
|
||||||
|
max-height:100%;
|
||||||
|
overflow-x: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
h1 {
|
||||||
|
color: #d32f2f;
|
||||||
|
text-align: center;
|
||||||
|
font-size: 1.5rem;
|
||||||
|
margin: 10px 0 15px 0;
|
||||||
|
font-weight: 500;
|
||||||
|
}
|
||||||
|
|
||||||
|
h2 {
|
||||||
|
color: #f57c00;
|
||||||
|
font-size: 1.3rem;
|
||||||
|
margin: 20px 0 10px 0;
|
||||||
|
font-weight: 500;
|
||||||
|
padding-bottom: 3px;
|
||||||
|
border-bottom: 1px solid #eee;
|
||||||
|
}
|
||||||
|
|
||||||
|
p {
|
||||||
|
margin-bottom: 15px;
|
||||||
|
font-size: 0.95rem;
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
.kanji {
|
||||||
|
font-size: 2.2rem;
|
||||||
|
text-align: center;
|
||||||
|
color: #333;
|
||||||
|
margin: 10px 0;
|
||||||
|
font-family: 'Noto Sans JP', sans-serif;
|
||||||
|
line-height: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.main-image {
|
||||||
|
width: 100%;
|
||||||
|
margin: 15px 0;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.main-image img {
|
||||||
|
max-width: 100%;
|
||||||
|
height: auto;
|
||||||
|
border-radius: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.main-image p {
|
||||||
|
text-align: center;
|
||||||
|
font-size: 0.85rem;
|
||||||
|
color: #666;
|
||||||
|
margin-top: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ingredients {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: 1fr 1fr;
|
||||||
|
gap: 10px;
|
||||||
|
margin: 15px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ingredient {
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ingredient img {
|
||||||
|
width: 100%;
|
||||||
|
border-radius: 6px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ingredient p {
|
||||||
|
font-size: 0.85rem;
|
||||||
|
margin-top: 3px;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.highlight {
|
||||||
|
background-color: #f5f5f5;
|
||||||
|
padding: 12px;
|
||||||
|
margin: 15px 0;
|
||||||
|
border-radius: 6px;
|
||||||
|
}
|
||||||
|
|
||||||
|
ul {
|
||||||
|
padding-left: 20px;
|
||||||
|
margin-bottom: 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
li {
|
||||||
|
margin-bottom: 8px;
|
||||||
|
font-size: 0.95rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
strong {
|
||||||
|
font-weight: 500;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<h1>Furikake: Taburan Lezat untuk Nasi!</h1>
|
||||||
|
|
||||||
|
<div class="kanji">振り掛け</div>
|
||||||
|
|
||||||
|
<p>Tahukah kamu bahwa di Jepang ada bumbu tabur yang
|
||||||
|
bisa membuat nasi menjadi lebih enak? Namanya Furikake! Kata "furikake" berasal dari bahasa Jepang,
|
||||||
|
yaitu "furi" yang berarti menaburkan dan "kake" yang berarti menuangkan.
|
||||||
|
Jadi, furikake adalah bumbu yang ditaburkan di atas nasi supaya lebih lezat!</p>
|
||||||
|
""",
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|||||||
@ -4,7 +4,7 @@ import 'package:flutter_html/flutter_html.dart';
|
|||||||
class ListDetailScreen extends StatefulWidget {
|
class ListDetailScreen extends StatefulWidget {
|
||||||
final String title;
|
final String title;
|
||||||
final String imagePath;
|
final String imagePath;
|
||||||
final List<String> paragraphs;
|
final String paragraphs;
|
||||||
|
|
||||||
const ListDetailScreen({
|
const ListDetailScreen({
|
||||||
Key? key,
|
Key? key,
|
||||||
@ -55,95 +55,108 @@ class _ListDetailScreenState extends State<ListDetailScreen> {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Padding(
|
|
||||||
padding: const EdgeInsets.all(20.0),
|
// Padding(
|
||||||
child: Row(
|
// padding: const EdgeInsets.all(20.0),
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
// child: Row(
|
||||||
children: [
|
// crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
Image.asset(
|
// children: [
|
||||||
widget.imagePath,
|
// Image.asset(
|
||||||
width: 100,
|
// widget.imagePath,
|
||||||
height: 100,
|
// width: 100,
|
||||||
fit: BoxFit.cover,
|
// height: 100,
|
||||||
),
|
// fit: BoxFit.cover,
|
||||||
const SizedBox(width: 16),
|
// ),
|
||||||
Expanded(
|
// const SizedBox(width: 16),
|
||||||
child: Text(
|
// Expanded(
|
||||||
widget.title,
|
// child: Center(
|
||||||
style: const TextStyle(
|
// child: Text(
|
||||||
fontSize: 22,
|
// widget.title,
|
||||||
fontWeight: FontWeight.bold,
|
// style: const TextStyle(
|
||||||
color: Colors.black,
|
// fontSize: 22,
|
||||||
),
|
// fontWeight: FontWeight.bold,
|
||||||
),
|
// color: Colors.black,
|
||||||
),
|
// ),
|
||||||
],
|
// ),
|
||||||
),
|
// ),
|
||||||
),
|
// ),
|
||||||
const SizedBox(height: 16),
|
// ],
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
const SizedBox(height: 0),
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: const EdgeInsets.all(18.0),
|
padding: const EdgeInsets.only(left: 18.0, right: 18, bottom: 18),
|
||||||
child: ListView.builder(
|
child:
|
||||||
itemCount: widget.paragraphs.length,
|
// ListView.builder(
|
||||||
itemBuilder: (context, index) {
|
// itemCount: widget.paragraphs.length,
|
||||||
return Padding(
|
// itemBuilder: (context, index) {
|
||||||
padding: const EdgeInsets.only(bottom: 16.0),
|
// return
|
||||||
child: Row(
|
// Padding(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
// padding: const EdgeInsets.only(bottom: 16.0),
|
||||||
children: [
|
// child: Row(
|
||||||
Expanded(
|
// crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
child:
|
// children: [
|
||||||
// Text(
|
// Expanded(
|
||||||
// widget.paragraphs[index] +
|
// child:
|
||||||
// style: TextStyle(color: Colors.black),
|
// // Text(
|
||||||
Html(
|
// // widget.paragraphs[index] +
|
||||||
style: {"body": Style(color: Colors.black)},
|
// // style: TextStyle(color: Colors.black),
|
||||||
data:
|
// Html(
|
||||||
widget.paragraphs.toString() +
|
// // style: {
|
||||||
"""
|
// // "body": Style(
|
||||||
<html>
|
// // color: const Color.fromRGBO(0, 0, 0, 1),
|
||||||
<!-- Text between angle brackets is an HTML tag and is not displayed.
|
// // ),
|
||||||
Most tags, such as the HTML and /HTML tags that surround the contents of
|
// // },
|
||||||
a page, come in pairs; some tags, like HR, for a horizontal rule, stand
|
// data:
|
||||||
alone. Comments, such as the text you're reading, are not displayed when
|
// widget.paragraphs +
|
||||||
the Web page is shown. The information between the HEAD and /HEAD tags is
|
// """
|
||||||
not displayed. The information between the BODY and /BODY tags is displayed.-->
|
// <html>
|
||||||
<head>
|
// <!-- Text between angle brackets is an HTML tag and is not displayed.
|
||||||
<title>Enter a title, displayed at the top of the window.</title>
|
// Most tags, such as the HTML and /HTML tags that surround the contents of
|
||||||
</head>
|
// a page, come in pairs; some tags, like HR, for a horizontal rule, stand
|
||||||
<!-- The information between the BODY and /BODY tags is displayed.-->
|
// alone. Comments, such as the text you're reading, are not displayed when
|
||||||
<body>
|
// the Web page is shown. The information between the HEAD and /HEAD tags is
|
||||||
<h1>Enter the main heading, usually the same as the title.</h1>
|
// not displayed. The information between the BODY and /BODY tags is displayed.-->
|
||||||
<p>Be <b>bold</b> in stating your key points. Put them in a list: </p>
|
// <head>
|
||||||
<ul>
|
// <title>Enter a title, displayed at the top of the window.</title>
|
||||||
<li>The first item in your list</li>
|
// </head>
|
||||||
<li>The second item; <i>italicize</i> key words</li>
|
// <!-- The information between the BODY and /BODY tags is displayed.-->
|
||||||
</ul>
|
// <body>
|
||||||
<p>Improve your image by including an image. </p>
|
// <h1>Enter the main heading, usually the same as the title.</h1>
|
||||||
<p><img src="http://www.mygifs.com/CoverImage.gif" alt="A Great HTML Resource"></p>
|
// <p>Be <b>bold</b> in stating your key points. Put them in a list: </p>
|
||||||
<p>Add a link to your favorite <a href="https://www.dummies.com/">Web site</a>.
|
// <ul>
|
||||||
Break up your page with a horizontal rule or two. </p>
|
// <li>The first item in your list</li>
|
||||||
<hr>
|
// <li>The second item; <i>italicize</i> key words</li>
|
||||||
<p>Finally, link to <a href="page2.html">another page</a> in your own Web site.</p>
|
// </ul>
|
||||||
<!-- And add a copyright notice.-->
|
// <p>Improve your image by including an image. </p>
|
||||||
<p>© Wiley Publishing, 2011</p>
|
// <p><img src="http://www.mygifs.com/CoverImage.gif" alt="A Great HTML Resource"></p>
|
||||||
</body>
|
// <p>Add a link to your favorite <a href="https://www.dummies.com/">Web site</a>.
|
||||||
</html>
|
// Break up your page with a horizontal rule or two. </p>
|
||||||
""",
|
// <hr>
|
||||||
),
|
// <p>Finally, link to <a href="page2.html">another page</a> in your own Web site.</p>
|
||||||
),
|
// <!-- And add a copyright notice.-->
|
||||||
// ),
|
// <p>© Wiley Publishing, 2011</p>
|
||||||
// Checkbox(
|
// </body>
|
||||||
// value: _readStatus[index],
|
// </html>
|
||||||
// onChanged: (bool? value) {
|
// """,
|
||||||
// _toggleReadStatus(index);
|
// ),
|
||||||
// },
|
// ),
|
||||||
// ),
|
// // ),
|
||||||
],
|
// // Checkbox(
|
||||||
),
|
// // value: _readStatus[index],
|
||||||
);
|
// // onChanged: (bool? value) {
|
||||||
},
|
// // _toggleReadStatus(index);
|
||||||
|
// // },
|
||||||
|
// // ),
|
||||||
|
// ],
|
||||||
|
// ),
|
||||||
|
// );
|
||||||
|
// },
|
||||||
|
// ),
|
||||||
|
Html(
|
||||||
|
style: {"body": Style(color: const Color.fromRGBO(0, 0, 0, 1))},
|
||||||
|
data: widget.paragraphs,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
114
pubspec.lock
114
pubspec.lock
@ -33,6 +33,46 @@ packages:
|
|||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.1.2"
|
version: "2.1.2"
|
||||||
|
camera:
|
||||||
|
dependency: "direct main"
|
||||||
|
description:
|
||||||
|
name: camera
|
||||||
|
sha256: dfa8fc5a1adaeb95e7a54d86a5bd56f4bb0e035515354c8ac6d262e35cec2ec8
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "0.10.6"
|
||||||
|
camera_android:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: camera_android
|
||||||
|
sha256: bd9737671a00d979e0310a946e5be2fdc621b6a36b95378755cb3e4498e61485
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "0.10.10+2"
|
||||||
|
camera_avfoundation:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: camera_avfoundation
|
||||||
|
sha256: a33cd9a250296271cdf556891b7c0986a93772426f286595eccd5f45b185933c
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "0.9.18+14"
|
||||||
|
camera_platform_interface:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: camera_platform_interface
|
||||||
|
sha256: "2f757024a48696ff4814a789b0bd90f5660c0fb25f393ab4564fb483327930e2"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "2.10.0"
|
||||||
|
camera_web:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: camera_web
|
||||||
|
sha256: "595f28c89d1fb62d77c73c633193755b781c6d2e0ebcd8dc25b763b514e6ba8f"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "0.3.5"
|
||||||
characters:
|
characters:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@ -416,6 +456,54 @@ packages:
|
|||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.3.0"
|
version: "2.3.0"
|
||||||
|
permission_handler:
|
||||||
|
dependency: "direct main"
|
||||||
|
description:
|
||||||
|
name: permission_handler
|
||||||
|
sha256: "59adad729136f01ea9e35a48f5d1395e25cba6cea552249ddbe9cf950f5d7849"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "11.4.0"
|
||||||
|
permission_handler_android:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: permission_handler_android
|
||||||
|
sha256: d3971dcdd76182a0c198c096b5db2f0884b0d4196723d21a866fc4cdea057ebc
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "12.1.0"
|
||||||
|
permission_handler_apple:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: permission_handler_apple
|
||||||
|
sha256: f000131e755c54cf4d84a5d8bd6e4149e262cc31c5a8b1d698de1ac85fa41023
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "9.4.7"
|
||||||
|
permission_handler_html:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: permission_handler_html
|
||||||
|
sha256: "38f000e83355abb3392140f6bc3030660cfaef189e1f87824facb76300b4ff24"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "0.1.3+5"
|
||||||
|
permission_handler_platform_interface:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: permission_handler_platform_interface
|
||||||
|
sha256: eb99b295153abce5d683cac8c02e22faab63e50679b937fa1bf67d58bb282878
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "4.3.0"
|
||||||
|
permission_handler_windows:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: permission_handler_windows
|
||||||
|
sha256: "1a790728016f79a41216d88672dbc5df30e686e811ad4e698bfc51f76ad91f1e"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "0.2.1"
|
||||||
petitparser:
|
petitparser:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@ -533,6 +621,14 @@ packages:
|
|||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.1.4"
|
version: "2.1.4"
|
||||||
|
stream_transform:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: stream_transform
|
||||||
|
sha256: ad47125e588cfd37a9a7f86c7d6356dde8dfe89d071d293f80ca9e9273a33871
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "2.1.1"
|
||||||
string_scanner:
|
string_scanner:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@ -678,37 +774,37 @@ packages:
|
|||||||
source: hosted
|
source: hosted
|
||||||
version: "1.1.0"
|
version: "1.1.0"
|
||||||
webview_flutter:
|
webview_flutter:
|
||||||
dependency: transitive
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
name: webview_flutter
|
name: webview_flutter
|
||||||
sha256: "889a0a678e7c793c308c68739996227c9661590605e70b1f6cf6b9a6634f7aec"
|
sha256: caf0f5a1012aa3c2d33c4215adc72dc1194bb59a2d3ed901f457965626805e66
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "4.10.0"
|
version: "4.11.0"
|
||||||
webview_flutter_android:
|
webview_flutter_android:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: webview_flutter_android
|
name: webview_flutter_android
|
||||||
sha256: "512c26ccc5b8a571fd5d13ec994b7509f142ff6faf85835e243dde3538fdc713"
|
sha256: "5c3b6f992d123084903ec091b84f021c413a92a9af49038e4564a1b26c8452cf"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "4.3.2"
|
version: "4.4.1"
|
||||||
webview_flutter_platform_interface:
|
webview_flutter_platform_interface:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: webview_flutter_platform_interface
|
name: webview_flutter_platform_interface
|
||||||
sha256: d937581d6e558908d7ae3dc1989c4f87b786891ab47bb9df7de548a151779d8d
|
sha256: "18b1640839cf6546784a524c72aded5b6e86b23e7167dc2311cc96f7658b64bd"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.10.0"
|
version: "2.11.0"
|
||||||
webview_flutter_wkwebview:
|
webview_flutter_wkwebview:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: webview_flutter_wkwebview
|
name: webview_flutter_wkwebview
|
||||||
sha256: d7403ef4f042714c9ee2b26eaac4cadae7394cb0d4e608b1dd850c3ff96bd893
|
sha256: c9f9be526fa0d3347374ceaa05c4b3acb85f4f112abd62f7d74b7d301fa515ff
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "3.18.2"
|
version: "3.20.0"
|
||||||
xdg_directories:
|
xdg_directories:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
|||||||
@ -30,7 +30,8 @@ environment:
|
|||||||
dependencies:
|
dependencies:
|
||||||
flutter:
|
flutter:
|
||||||
sdk: flutter
|
sdk: flutter
|
||||||
|
camera: ^0.10.5+5
|
||||||
|
permission_handler: ^11.3.0
|
||||||
# The following adds the Cupertino Icons font to your application.
|
# The following adds the Cupertino Icons font to your application.
|
||||||
# Use with the CupertinoIcons class for iOS style icons.
|
# Use with the CupertinoIcons class for iOS style icons.
|
||||||
cupertino_icons: ^1.0.8
|
cupertino_icons: ^1.0.8
|
||||||
@ -44,6 +45,7 @@ dependencies:
|
|||||||
image_picker_for_web: ^3.0.6
|
image_picker_for_web: ^3.0.6
|
||||||
image_picker_web: ^4.0.0
|
image_picker_web: ^4.0.0
|
||||||
flutter_plugin_android_lifecycle: ^2.0.9
|
flutter_plugin_android_lifecycle: ^2.0.9
|
||||||
|
webview_flutter: ^4.11.0
|
||||||
# arcore_flutter_plugin: ^0.2.0-alpha
|
# arcore_flutter_plugin: ^0.2.0-alpha
|
||||||
# flutter_unity_widget: ^2022.2.1
|
# flutter_unity_widget: ^2022.2.1
|
||||||
# arcore_flutter_plugin:
|
# arcore_flutter_plugin:
|
||||||
|
|||||||
@ -7,11 +7,14 @@
|
|||||||
#include "generated_plugin_registrant.h"
|
#include "generated_plugin_registrant.h"
|
||||||
|
|
||||||
#include <file_selector_windows/file_selector_windows.h>
|
#include <file_selector_windows/file_selector_windows.h>
|
||||||
|
#include <permission_handler_windows/permission_handler_windows_plugin.h>
|
||||||
#include <url_launcher_windows/url_launcher_windows.h>
|
#include <url_launcher_windows/url_launcher_windows.h>
|
||||||
|
|
||||||
void RegisterPlugins(flutter::PluginRegistry* registry) {
|
void RegisterPlugins(flutter::PluginRegistry* registry) {
|
||||||
FileSelectorWindowsRegisterWithRegistrar(
|
FileSelectorWindowsRegisterWithRegistrar(
|
||||||
registry->GetRegistrarForPlugin("FileSelectorWindows"));
|
registry->GetRegistrarForPlugin("FileSelectorWindows"));
|
||||||
|
PermissionHandlerWindowsPluginRegisterWithRegistrar(
|
||||||
|
registry->GetRegistrarForPlugin("PermissionHandlerWindowsPlugin"));
|
||||||
UrlLauncherWindowsRegisterWithRegistrar(
|
UrlLauncherWindowsRegisterWithRegistrar(
|
||||||
registry->GetRegistrarForPlugin("UrlLauncherWindows"));
|
registry->GetRegistrarForPlugin("UrlLauncherWindows"));
|
||||||
}
|
}
|
||||||
|
|||||||
@ -4,6 +4,7 @@
|
|||||||
|
|
||||||
list(APPEND FLUTTER_PLUGIN_LIST
|
list(APPEND FLUTTER_PLUGIN_LIST
|
||||||
file_selector_windows
|
file_selector_windows
|
||||||
|
permission_handler_windows
|
||||||
url_launcher_windows
|
url_launcher_windows
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user