file_info_dialog.dart 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747
  1. import "dart:io";
  2. import "package:exif/exif.dart";
  3. import "package:flutter/cupertino.dart";
  4. import "package:flutter/material.dart";
  5. import "package:photos/core/configuration.dart";
  6. import "package:photos/ente_theme_data.dart";
  7. import "package:photos/models/file.dart";
  8. import "package:photos/models/file_type.dart";
  9. import "package:photos/services/collections_service.dart";
  10. import "package:photos/ui/viewer/file/exif_info_dialog.dart";
  11. import "package:photos/utils/date_time_util.dart";
  12. import "package:photos/utils/exif_util.dart";
  13. import "package:photos/utils/file_util.dart";
  14. import "package:photos/utils/magic_util.dart";
  15. import "package:photos/utils/toast_util.dart";
  16. class FileInfoWidget extends StatefulWidget {
  17. final File file;
  18. const FileInfoWidget(
  19. this.file, {
  20. Key key,
  21. }) : super(key: key);
  22. @override
  23. State<FileInfoWidget> createState() => _FileInfoWidgetState();
  24. }
  25. class _FileInfoWidgetState extends State<FileInfoWidget> {
  26. Map<String, IfdTag> _exif;
  27. final Map<String, dynamic> _exifData = {
  28. "focalLength": null,
  29. "fNumber": null,
  30. "resolution": null,
  31. "takenOnDevice": null,
  32. "exposureTime": null,
  33. "ISO": null,
  34. "megaPixels": null
  35. };
  36. bool _isImage = false;
  37. Color infoColor;
  38. @override
  39. void initState() {
  40. debugPrint('file_info_dialog initState');
  41. _isImage = widget.file.fileType == FileType.image ||
  42. widget.file.fileType == FileType.livePhoto;
  43. if (_isImage) {
  44. getExif(widget.file).then((exif) {
  45. setState(() {
  46. _exif = exif;
  47. });
  48. });
  49. }
  50. super.initState();
  51. }
  52. @override
  53. Widget build(BuildContext context) {
  54. final file = widget.file;
  55. final dateTime = DateTime.fromMicrosecondsSinceEpoch(file.creationTime);
  56. final dateTimeForUpdationTime =
  57. DateTime.fromMicrosecondsSinceEpoch(file.updationTime);
  58. infoColor =
  59. Theme.of(context).colorScheme.onSurface.withOpacity(0.85); //remove
  60. if (_isImage && _exif != null) {
  61. _generateExifForDetails(_exif);
  62. }
  63. final bool showExifListTile = _exifData["focalLength"] != null ||
  64. _exifData["fNumber"] != null ||
  65. _exifData["takenOnDevice"] != null ||
  66. _exifData["exposureTime"] != null ||
  67. _exifData["ISO"] != null;
  68. var listTiles = <Widget>[
  69. ListTile(
  70. leading: const Padding(
  71. padding: EdgeInsets.only(top: 8, left: 6),
  72. child: Icon(Icons.calendar_today_rounded),
  73. ),
  74. title: Text(
  75. getFullDate(
  76. DateTime.fromMicrosecondsSinceEpoch(file.creationTime),
  77. ),
  78. ),
  79. subtitle: Text(
  80. getTimeIn12hrFormat(dateTime) + " " + dateTime.timeZoneName,
  81. style: Theme.of(context)
  82. .textTheme
  83. .bodyText2
  84. .copyWith(color: Colors.black.withOpacity(0.5)),
  85. ),
  86. trailing: (widget.file.ownerID == null ||
  87. widget.file.ownerID ==
  88. Configuration.instance.getUserID()) &&
  89. widget.file.uploadedFileID != null
  90. ? IconButton(
  91. onPressed: () {
  92. PopupMenuItem(
  93. value: 2,
  94. child: Row(
  95. children: [
  96. Icon(
  97. Platform.isAndroid
  98. ? Icons.access_time_rounded
  99. : CupertinoIcons.time,
  100. color: Theme.of(context).iconTheme.color,
  101. ),
  102. const Padding(
  103. padding: EdgeInsets.all(8),
  104. ),
  105. const Text("Edit time"),
  106. ],
  107. ),
  108. );
  109. },
  110. icon: const Icon(Icons.edit),
  111. )
  112. : const SizedBox.shrink(),
  113. ),
  114. const DividerWithPadding(),
  115. ListTile(
  116. leading: _isImage
  117. ? const Padding(
  118. padding: EdgeInsets.only(top: 8, left: 6),
  119. child: Icon(
  120. Icons.image,
  121. ),
  122. )
  123. : const Padding(
  124. padding: EdgeInsets.only(top: 8, left: 6),
  125. child: Icon(
  126. Icons.video_camera_back,
  127. size: 27,
  128. ),
  129. ),
  130. title: Text(
  131. file.getDisplayName(),
  132. ),
  133. subtitle: Row(
  134. children: [
  135. Padding(
  136. padding: const EdgeInsets.only(right: 10),
  137. child: _getFileSize(),
  138. ),
  139. !_isImage ? _getVideoDuration() : const SizedBox.shrink(),
  140. ],
  141. ),
  142. trailing: file.uploadedFileID == null ||
  143. file.ownerID != Configuration.instance.getUserID()
  144. ? const SizedBox.shrink()
  145. : IconButton(
  146. onPressed: () async {
  147. await editFilename(context, file);
  148. setState(() {});
  149. },
  150. icon: const Icon(Icons.edit),
  151. ),
  152. ),
  153. const DividerWithPadding(),
  154. ListTile(
  155. leading: const Padding(
  156. padding: EdgeInsets.only(left: 6),
  157. child: Icon(Icons.folder_outlined),
  158. ),
  159. title: Text(
  160. file.deviceFolder ??
  161. CollectionsService.instance
  162. .getCollectionByID(file.collectionID)
  163. .name,
  164. ),
  165. ),
  166. const DividerWithPadding(),
  167. showExifListTile
  168. ? ListTile(
  169. leading: const Padding(
  170. padding: EdgeInsets.only(left: 6),
  171. child: Icon(Icons.camera_rounded),
  172. ),
  173. title: Text(_exifData["takenOnDevice"] ?? "--"),
  174. subtitle: Row(
  175. children: [
  176. _exifData["fNumber"] != null
  177. ? Padding(
  178. padding: const EdgeInsets.only(right: 10),
  179. child: Text('ƒ/' + _exifData["fNumber"].toString()),
  180. )
  181. : const SizedBox.shrink(),
  182. _exifData["exposureTime"] != null
  183. ? Padding(
  184. padding: const EdgeInsets.only(right: 10),
  185. child: Text(_exifData["exposureTime"]),
  186. )
  187. : const SizedBox.shrink(),
  188. _exifData["focalLength"] != null
  189. ? Padding(
  190. padding: const EdgeInsets.only(right: 10),
  191. child:
  192. Text(_exifData["focalLength"].toString() + "mm"),
  193. )
  194. : const SizedBox.shrink(),
  195. _exifData["ISO"] != null
  196. ? Padding(
  197. padding: const EdgeInsets.only(right: 10),
  198. child: Text("ISO" + _exifData["ISO"].toString()),
  199. )
  200. : const SizedBox.shrink(),
  201. ],
  202. ),
  203. )
  204. : const SizedBox.shrink(),
  205. showExifListTile ? const DividerWithPadding() : const SizedBox.shrink(),
  206. (file.uploadedFileID != null && file.updationTime != null)
  207. ? ListTile(
  208. leading: const Padding(
  209. padding: EdgeInsets.only(top: 8, left: 6),
  210. child: Icon(Icons.cloud_upload_outlined),
  211. ),
  212. title: Text(
  213. getFullDate(
  214. DateTime.fromMicrosecondsSinceEpoch(file.updationTime),
  215. ),
  216. ),
  217. subtitle: Text(
  218. getTimeIn12hrFormat(dateTimeForUpdationTime) +
  219. " " +
  220. dateTimeForUpdationTime.timeZoneName,
  221. style: Theme.of(context)
  222. .textTheme
  223. .bodyText2
  224. .copyWith(color: Colors.black.withOpacity(0.5)),
  225. ),
  226. )
  227. : const SizedBox.shrink(),
  228. ];
  229. var items = <Widget>[
  230. Row(
  231. children: [
  232. Icon(Icons.calendar_today_outlined, color: infoColor),
  233. const SizedBox(height: 8),
  234. Text(
  235. getFormattedTime(
  236. DateTime.fromMicrosecondsSinceEpoch(file.creationTime),
  237. ),
  238. style: TextStyle(color: infoColor),
  239. ),
  240. ],
  241. ),
  242. const SizedBox(height: 12),
  243. Row(
  244. children: [
  245. Icon(Icons.folder_outlined, color: infoColor),
  246. const Padding(padding: EdgeInsets.all(4)),
  247. Text(
  248. file.deviceFolder ??
  249. CollectionsService.instance
  250. .getCollectionByID(file.collectionID)
  251. .name,
  252. style: TextStyle(color: infoColor),
  253. ),
  254. ],
  255. ),
  256. const SizedBox(height: 12),
  257. ];
  258. items.addAll(
  259. [
  260. Row(
  261. children: [
  262. Icon(Icons.sd_storage_outlined, color: infoColor),
  263. const Padding(padding: EdgeInsets.all(4)),
  264. _getFileSize(),
  265. ],
  266. ),
  267. const SizedBox(height: 12),
  268. ],
  269. );
  270. if (file.localID != null && !_isImage) {
  271. //remove
  272. items.addAll(
  273. [
  274. Row(
  275. children: [
  276. Icon(Icons.timer_outlined, color: infoColor),
  277. const Padding(padding: EdgeInsets.all(4)),
  278. FutureBuilder(
  279. future: file.getAsset(),
  280. builder: (context, snapshot) {
  281. if (snapshot.hasData) {
  282. return Text(
  283. snapshot.data.videoDuration.toString().split(".")[0],
  284. style: TextStyle(color: infoColor),
  285. );
  286. } else {
  287. return Center(
  288. child: SizedBox.fromSize(
  289. size: const Size.square(24),
  290. child: const CupertinoActivityIndicator(
  291. radius: 8,
  292. ),
  293. ),
  294. );
  295. }
  296. },
  297. ),
  298. ],
  299. ),
  300. const SizedBox(height: 12),
  301. ],
  302. );
  303. }
  304. if (_isImage && _exif != null) {
  305. //remove
  306. // items.add(_getExifWidgets(_exif));
  307. _generateExifForDetails(_exif);
  308. }
  309. if (file.uploadedFileID != null && file.updationTime != null) {
  310. items.addAll(
  311. [
  312. Row(
  313. children: [
  314. Icon(Icons.cloud_upload_outlined, color: infoColor),
  315. const Padding(padding: EdgeInsets.all(4)),
  316. Text(
  317. getFormattedTime(
  318. DateTime.fromMicrosecondsSinceEpoch(file.updationTime),
  319. ),
  320. style: TextStyle(color: infoColor),
  321. ),
  322. ],
  323. ),
  324. ],
  325. );
  326. }
  327. items.add(
  328. const SizedBox(height: 12),
  329. );
  330. items.add(
  331. Row(
  332. mainAxisAlignment:
  333. _isImage ? MainAxisAlignment.spaceBetween : MainAxisAlignment.end,
  334. children: _getActions(),
  335. ),
  336. );
  337. Widget titleContent;
  338. if (file.uploadedFileID == null ||
  339. file.ownerID != Configuration.instance.getUserID()) {
  340. titleContent = Text(file.getDisplayName());
  341. } else {
  342. titleContent = InkWell(
  343. child: Row(
  344. mainAxisAlignment: MainAxisAlignment.spaceBetween,
  345. children: [
  346. Flexible(
  347. child: Text(
  348. file.getDisplayName(),
  349. style: Theme.of(context).textTheme.headline5,
  350. ),
  351. ),
  352. const SizedBox(width: 16),
  353. Icon(Icons.edit, color: infoColor),
  354. ],
  355. ),
  356. onTap: () async {
  357. await editFilename(context, file);
  358. setState(() {});
  359. },
  360. );
  361. }
  362. // return AlertDialog(
  363. // title: titleContent,
  364. // content: SingleChildScrollView(
  365. // child: ListBody(
  366. // children: items,
  367. // ),
  368. // ),
  369. // );
  370. return Column(
  371. mainAxisSize: MainAxisSize.min,
  372. children: [
  373. Padding(
  374. padding: const EdgeInsets.all(10),
  375. child: Row(
  376. crossAxisAlignment: CrossAxisAlignment.center,
  377. children: [
  378. IconButton(
  379. onPressed: () {
  380. Navigator.pop(context);
  381. },
  382. icon: const Icon(
  383. Icons.close,
  384. ),
  385. ),
  386. const SizedBox(width: 6),
  387. Padding(
  388. padding: const EdgeInsets.only(bottom: 2),
  389. child: Text(
  390. "Details",
  391. style: Theme.of(context).textTheme.bodyText1,
  392. ),
  393. ),
  394. ],
  395. ),
  396. ),
  397. ...listTiles
  398. ],
  399. );
  400. }
  401. List<Widget> _getActions() {
  402. final List<Widget> actions = [];
  403. if (_isImage) {
  404. if (_exif == null) {
  405. actions.add(
  406. TextButton(
  407. child: Row(
  408. mainAxisAlignment: MainAxisAlignment.spaceAround,
  409. children: [
  410. Center(
  411. child: SizedBox.fromSize(
  412. size: const Size.square(24),
  413. child: const CupertinoActivityIndicator(
  414. radius: 8,
  415. ),
  416. ),
  417. ),
  418. const Padding(padding: EdgeInsets.all(4)),
  419. Text(
  420. "EXIF",
  421. style: TextStyle(color: infoColor),
  422. ),
  423. ],
  424. ),
  425. onPressed: () {
  426. showDialog(
  427. context: context,
  428. builder: (BuildContext context) {
  429. return ExifInfoDialog(widget.file);
  430. },
  431. barrierColor: Colors.black87,
  432. );
  433. },
  434. ),
  435. );
  436. } else if (_exif.isNotEmpty) {
  437. actions.add(
  438. TextButton(
  439. child: Row(
  440. mainAxisAlignment: MainAxisAlignment.spaceAround,
  441. children: [
  442. Icon(Icons.feed_outlined, color: infoColor),
  443. const Padding(padding: EdgeInsets.all(4)),
  444. Text(
  445. "View raw EXIF",
  446. style: TextStyle(color: infoColor),
  447. ),
  448. ],
  449. ),
  450. onPressed: () {
  451. showDialog(
  452. context: context,
  453. builder: (BuildContext context) {
  454. return ExifInfoDialog(widget.file);
  455. },
  456. barrierColor: Colors.black87,
  457. );
  458. },
  459. ),
  460. );
  461. } else {
  462. actions.add(
  463. TextButton(
  464. child: Row(
  465. mainAxisAlignment: MainAxisAlignment.spaceAround,
  466. children: [
  467. Icon(
  468. Icons.feed_outlined,
  469. color: Theme.of(context)
  470. .colorScheme
  471. .defaultTextColor
  472. .withOpacity(0.5),
  473. ),
  474. const Padding(padding: EdgeInsets.all(4)),
  475. Text(
  476. "No exif",
  477. style: TextStyle(
  478. color: Theme.of(context)
  479. .colorScheme
  480. .defaultTextColor
  481. .withOpacity(0.5),
  482. ),
  483. ),
  484. ],
  485. ),
  486. onPressed: () {
  487. showShortToast(context, "This image has no exif data");
  488. },
  489. ),
  490. );
  491. }
  492. }
  493. actions.add(
  494. TextButton(
  495. child: Text(
  496. "Close",
  497. style: TextStyle(
  498. color: infoColor,
  499. ),
  500. ),
  501. onPressed: () {
  502. Navigator.of(context, rootNavigator: true).pop("dialog");
  503. },
  504. ),
  505. );
  506. return actions;
  507. }
  508. _generateExifForDetails(Map<String, IfdTag> exif) {
  509. if (exif["EXIF FocalLength"] != null) {
  510. _exifData["focalLength"] =
  511. (exif["EXIF FocalLength"].values.toList()[0] as Ratio).numerator /
  512. (exif["EXIF FocalLength"].values.toList()[0] as Ratio)
  513. .denominator;
  514. }
  515. if (exif["EXIF FNumber"] != null) {
  516. _exifData["fNumber"] =
  517. (exif["EXIF FNumber"].values.toList()[0] as Ratio).numerator /
  518. (exif["EXIF FNumber"].values.toList()[0] as Ratio).denominator;
  519. }
  520. if (exif["EXIF ExifImageWidth"] != null &&
  521. exif["EXIF ExifImageLength"] != null) {
  522. _exifData["resolution"] = exif["EXIF ExifImageWidth"].toString() +
  523. " x " +
  524. exif["EXIF ExifImageLength"].toString();
  525. _exifData['megaPixels'] = ((exif["Image ImageWidth"].values.firstAsInt() *
  526. exif["Image ImageLength"].values.firstAsInt()) /
  527. 1000000)
  528. .toStringAsFixed(1);
  529. } else if (exif["Image ImageWidth"] != null &&
  530. exif["Image ImageLength"] != null) {
  531. _exifData["resolution"] = exif["Image ImageWidth"].toString() +
  532. " x " +
  533. exif["Image ImageLength"].toString();
  534. }
  535. if (exif["Image Make"] != null && exif["Image Model"] != null) {
  536. _exifData["takenOnDevice"] =
  537. exif["Image Make"].toString() + " " + exif["Image Model"].toString();
  538. }
  539. if (exif["EXIF ExposureTime"] != null) {
  540. _exifData["exposureTime"] = exif["EXIF ExposureTime"].toString();
  541. }
  542. if (exif["EXIF ISOSpeedRatings"] != null) {
  543. _exifData['ISO'] = exif["EXIF ISOSpeedRatings"].toString();
  544. }
  545. }
  546. Widget _getExifWidgets(Map<String, IfdTag> exif) {
  547. final focalLength = exif["EXIF FocalLength"] != null
  548. ? (exif["EXIF FocalLength"].values.toList()[0] as Ratio).numerator /
  549. (exif["EXIF FocalLength"].values.toList()[0] as Ratio)
  550. .denominator //to remove
  551. : null;
  552. final fNumber = exif["EXIF FNumber"] != null
  553. ? (exif["EXIF FNumber"].values.toList()[0] as Ratio).numerator /
  554. (exif["EXIF FNumber"].values.toList()[0] as Ratio)
  555. .denominator //to remove
  556. : null;
  557. final List<Widget> children = [];
  558. if (exif["EXIF ExifImageWidth"] != null &&
  559. exif["EXIF ExifImageLength"] != null) {
  560. children.addAll([
  561. Row(
  562. children: [
  563. Icon(Icons.photo_size_select_actual_outlined, color: infoColor),
  564. const Padding(padding: EdgeInsets.all(4)),
  565. Text(
  566. exif["EXIF ExifImageWidth"].toString() +
  567. " x " +
  568. exif["EXIF ExifImageLength"].toString(),
  569. style: TextStyle(color: infoColor),
  570. ),
  571. ],
  572. ),
  573. const Padding(padding: EdgeInsets.all(6)),
  574. ]);
  575. } else if (exif["Image ImageWidth"] != null &&
  576. exif["Image ImageLength"] != null) {
  577. children.addAll([
  578. Row(
  579. children: [
  580. Icon(Icons.photo_size_select_actual_outlined, color: infoColor),
  581. const Padding(padding: EdgeInsets.all(4)),
  582. Text(
  583. exif["Image ImageWidth"].toString() +
  584. " x " +
  585. exif["Image ImageLength"].toString(),
  586. style: TextStyle(color: infoColor),
  587. ),
  588. ],
  589. ),
  590. const Padding(padding: EdgeInsets.all(6)),
  591. ]);
  592. }
  593. if (exif["Image Make"] != null && exif["Image Model"] != null) {
  594. children.addAll(
  595. [
  596. Row(
  597. children: [
  598. Icon(Icons.camera_outlined, color: infoColor),
  599. const Padding(padding: EdgeInsets.all(4)),
  600. Flexible(
  601. child: Text(
  602. exif["Image Make"].toString() +
  603. " " +
  604. exif["Image Model"].toString(),
  605. style: TextStyle(color: infoColor),
  606. overflow: TextOverflow.clip,
  607. ),
  608. ),
  609. ],
  610. ),
  611. const Padding(padding: EdgeInsets.all(6)),
  612. ],
  613. );
  614. }
  615. if (fNumber != null) {
  616. children.addAll([
  617. Row(
  618. children: [
  619. Icon(CupertinoIcons.f_cursive, color: infoColor),
  620. const Padding(padding: EdgeInsets.all(4)),
  621. Text(
  622. fNumber.toString(),
  623. style: TextStyle(color: infoColor),
  624. ),
  625. ],
  626. ),
  627. const Padding(padding: EdgeInsets.all(6)),
  628. ]);
  629. }
  630. if (focalLength != null) {
  631. children.addAll([
  632. Row(
  633. children: [
  634. Icon(Icons.center_focus_strong_outlined, color: infoColor),
  635. const Padding(padding: EdgeInsets.all(4)),
  636. Text(
  637. focalLength.toString() + " mm",
  638. style: TextStyle(color: infoColor),
  639. ),
  640. ],
  641. ),
  642. const Padding(padding: EdgeInsets.all(6)),
  643. ]);
  644. }
  645. if (exif["EXIF ExposureTime"] != null) {
  646. children.addAll([
  647. Row(
  648. children: [
  649. Icon(Icons.shutter_speed, color: infoColor),
  650. const Padding(padding: EdgeInsets.all(4)),
  651. Text(
  652. exif["EXIF ExposureTime"].toString(),
  653. style: TextStyle(color: infoColor),
  654. ),
  655. ],
  656. ),
  657. const Padding(padding: EdgeInsets.all(6)),
  658. ]);
  659. }
  660. return Column(
  661. children: children,
  662. );
  663. }
  664. Widget _getFileSize() {
  665. return FutureBuilder(
  666. future: getFile(widget.file).then((f) => f.length()),
  667. builder: (context, snapshot) {
  668. if (snapshot.hasData) {
  669. return Text(
  670. (snapshot.data / (1024 * 1024)).toStringAsFixed(2) + " MB",
  671. );
  672. } else {
  673. return Center(
  674. child: SizedBox.fromSize(
  675. size: const Size.square(24),
  676. child: const CupertinoActivityIndicator(
  677. radius: 8,
  678. ),
  679. ),
  680. );
  681. }
  682. },
  683. );
  684. }
  685. Widget _getVideoDuration() {
  686. if (widget.file.duration != 0) {
  687. return Text(
  688. secondsToHHMMSS(widget.file.duration),
  689. );
  690. }
  691. return FutureBuilder(
  692. future: widget.file.getAsset(),
  693. builder: (context, snapshot) {
  694. if (snapshot.hasData) {
  695. return Text(
  696. snapshot.data.videoDuration.toString().split(".")[0],
  697. );
  698. } else {
  699. return Center(
  700. child: SizedBox.fromSize(
  701. size: const Size.square(24),
  702. child: const CupertinoActivityIndicator(
  703. radius: 8,
  704. ),
  705. ),
  706. );
  707. }
  708. },
  709. );
  710. }
  711. }
  712. class DividerWithPadding extends StatelessWidget {
  713. const DividerWithPadding({Key key}) : super(key: key);
  714. @override
  715. Widget build(BuildContext context) {
  716. return const Padding(
  717. padding: EdgeInsets.fromLTRB(70, 0, 20, 0),
  718. child: Divider(
  719. thickness: 0.5,
  720. ),
  721. );
  722. }
  723. }