From 635dfb3456b412f727012bfd10aa918ed2eaa4b7 Mon Sep 17 00:00:00 2001 From: Luke Date: Fri, 12 Jan 2024 15:22:02 +0000 Subject: [PATCH] Update non-quill parts --- .github/workflows/pr.yml | 2 +- .github/workflows/release.yml | 38 + example/lib/pages/html_view.dart | 782 ------------------ .../flutter/generated_plugin_registrant.cc | 12 +- example/linux/flutter/generated_plugins.cmake | 3 +- .../Flutter/GeneratedPluginRegistrant.swift | 6 +- example/pubspec.yaml | 4 + .../flutter/generated_plugin_registrant.cc | 9 +- .../windows/flutter/generated_plugins.cmake | 3 +- lib/src/components/atoms/button.dart | 2 +- lib/src/components/atoms/expandable.dart | 2 +- .../components/atoms/unread_badge_widget.dart | 2 +- lib/src/components/molecules/block_table.dart | 8 +- .../molecules/date_range_picker.dart | 12 +- .../molecules/fields_list_tile.dart | 2 +- .../components/molecules/network_avatar.dart | 2 +- lib/src/components/molecules/search.dart | 2 +- .../molecules/selectable_list_tile.dart | 4 +- .../components/molecules/sheet_header.dart | 2 +- .../molecules/slidable_list_tile.dart | 5 +- lib/src/components/molecules/stats_card.dart | 3 +- .../components/organisms/bottom_tab_bar.dart | 2 +- .../organisms/date_range_picker_tile.dart | 30 +- lib/src/components/organisms/day_picker.dart | 2 +- .../organisms/file_picker/file_picker.dart | 6 +- .../organisms/fiscal_date_picker.dart | 5 +- lib/src/utils/tools/nested_flow.dart | 10 +- pubspec.yaml | 2 +- 28 files changed, 107 insertions(+), 855 deletions(-) delete mode 100644 example/lib/pages/html_view.dart diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 6854f68..ba43168 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -46,7 +46,7 @@ jobs: ref: ${{ github.head_ref }} - uses: subosito/flutter-action@v2 with: - flutter-version: "3.13.x" + flutter-version: "3.16.x" channel: "stable" - name: Setup flutter run: flutter pub get diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a07980a..812d1b5 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,5 +1,6 @@ # name: "Release" +<<<<<<< Updated upstream # on: # push: # # tags: @@ -29,3 +30,40 @@ # dart format . # dart fix --apply # dart pub publish +======= +on: + push: + tags: + - "[0-9]+.[0-9]+.[0-9]+*" +jobs: + clean_build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: subosito/flutter-action@v2 + with: + flutter-version: "3.16.x" + channel: "stable" + - name: Setup flutter + run: flutter pub get + - name: build + run: | + cd example + flutter build web -o ../build --no-tree-shake-icons --base-href "/zds_flutter/" + - name: Deploy + uses: JamesIves/github-pages-deploy-action@v4 + with: + folder: build + - name: Publish + run: | + dart format . + dart fix --apply + name: Publish to pub.dev + publish: + needs: clean_build + permissions: + id-token: write # Required for authentication using OIDC + uses: dart-lang/setup-dart/.github/workflows/publish.yml@v1 + with: + environment: "pub.dev" +>>>>>>> Stashed changes diff --git a/example/lib/pages/html_view.dart b/example/lib/pages/html_view.dart deleted file mode 100644 index b700d70..0000000 --- a/example/lib/pages/html_view.dart +++ /dev/null @@ -1,782 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:zds_flutter/zds_flutter.dart'; - -const mediaHtml = ''' - - - - - Notes - - - - - - - - - - -

Media audio url:

-
-
-
-
-
- -

Media video Url:

-
-
-
-
-
- -

Links:

-

https://google.com

-

https://www.learningcontainer.com/wp-content/uploads/2020/05/sample-mp4-file.mp4

-

- - - - -'''; - -const html = ''' - - - - - Notes - - - - - - -
-

 

 

 

 

 

 

 

 

 

 

 

 

 

Bold : Retail describes the sale of a product or service to an individual consumer for personal use. I

talic: The transaction itself can occur through a number of different sales channels, such as online, in a brick-and-mortar storefront, through direct sales, or direct mail. Underline: The aspect of the sale that qualifies it as a retail transaction is that the end user is the buyer.

 

Bold Italic Underline : Retail describes the sale of a product or service to an individual consumer for personal use.The transaction itself can occur through a number of different sales channels, such as online, in a brick-and-mortar storefront, through direct sales, or direct mail. The aspect of the sale that qualifies it as a retail transaction is that the end user is the buyer.

 

Retail describes the sale of a product or service to an individual consumer for personal use.The transaction itself can occur through a number of different sales channels, such as online, in a brick-and-mortar storefront, through direct sales, or direct mail. The aspect of the sale that qualifies it as a retail transaction is that the end user is the buyer.

Retail describes the sale of a product or service to an individual consumer for personal use.The transaction itself can occur through a number of different sales channels, such as online, in a brick-and-mortar storefront, through direct sales, or direct mail. The aspect of the sale that qualifies it as a retail transaction is that the end user is the buyer.

 

Retail describes the sale of a product or service to an individual consumer for personal use.The transaction itself can occur through a number of different sales channels, such as online, in a brick-and-mortar storefront, through direct sales, or direct mail. The aspect of the sale that qualifies it as a retail transaction is that the end user is the buyer.

 

 

Within those categories you’ll also find different types of retail stores. Some of the most common types include:

HTML:
 

-
Column1Column2Column3Column4Column5Column6Column7
Col1Row1Col2Row1Col3Row1Col4Row1Col5Row1Col6Row1
Col1Row2Col2Row2Col3Row2Col4Row2Col5Row2Col6Row2 
Col1Row3Col2Row3Col3Row3Col4Row3Col5Row3Col6Row3
Col1Row4Col2Row4Col3Row4Col4Row4Col5Row4Col6Row4 
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Column1Column2Column3Column4Column5Column6Column7
-

Col1Row1

-

Col2Row1

-
Col3Row1Col4Row1Col5Row1 -

Col6Row1

-

Col6Row2

-
Col1Row2 -

Col2Row2

-

Col2Row3

-
-

Col3Row2

-

Col4Row2

-
Col5Row2
Col1Row3Col3Row3Col4Row3Col5Row3Col6Row3
Col1Row4Col2Row4Col3Row4Col4Row4Col5Row4Col6Row4
-
-

- 1. This paragraph has multiple lines. - But HTML reduces them to a single line, - omitting the carriage return we have used. - 2.This paragraph has multiple lines. - But HTML reduces them to a single line, - omitting the carriage return we have used. - 3. This paragraph has multiple lines. - But HTML reduces them to a single line, - omitting the carriage return we have used. - 4. This paragraph has multiple lines. - But HTML reduces them to a single line, - omitting the carriage return we have used. - 5. This paragraph has multiple lines. - But HTML reduces them to a single line, - omitting the carriage return we have used. -

-

- This paragraph has multiple spaces. - But HTML reduces them all to a single - space, omitting the extra spaces and line we have used. -

- - -

Links: 

https://google.com

https://www.learningcontainer.com/wp-content/uploads/2020/05/sample-mp4-file.mp4

 

 

 

 

Media audio url:

 

 

 

Media video Url:

 

 

iframe/embedded video

 

-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Column1Column2Column3Column4Column5Column6Column7
Col1Row1Col2Row1Col3Row1Col4Row1Col5Row1Col6Row1
Col1Row2Col2Row2Col3Row2Col4Row2Col5Row2Col6Row2 
Col1Row3Col2Row3Col3Row3Col4Row3Col5Row3Col6Row3
Col1Row4Col2Row4Col3Row4Col4Row4Col5Row4Col6Row4 
-
- - - - '''; - -const imgHtml = ''' - - - - - Notes - - - - - - -
- -

What Is Retail?

-

Definitions & Examples of Retail

-

By

-

Barbara Farfan

-

Barbara Farfan

-

Barbara Farfan has 20 years of experience as a business consultant in the retail industry.

-

LEARN ABOUT OUR EDITORIAL POLICIES

-

Updated on November 29, 2022

-

Reviewed by David Kindness

-

Customer looking at mens accessories with shop owner in mens boutique

-

PHOTO: THOMAS BARWICK / GETTY IMAGES

-

Retail is a very broad term that encompasses a huge industry, employing millions of people and generating trillions of dollars per year in sales revenue. Retail is the sale of goods to consumers—not for them to sell, but for use and consumption by the purchaser.

-

This knowledge can help you gain an understanding of the processes involved in getting merchandise to the shelves and the effect a supply chain can have on pricing and sales.

-

What Is Retail?

-

Retail involves the sale of merchandise from a single point of purchase directly to a customer who intends to use that product. The single point of purchase could be a brick-and-mortar retail store, an internet shopping website, or a catalog.

-

Retailing is all about attracting consumers through product displays and marketing. Inventory must be kept, shelves must be kept full, and payments have to be collected. Retailers are more than places to purchase merchandise, however—they provide manufacturers an outlet so that they can focus on creating their products.

-

Note

-

In essence, retailing is the culmination of many different processes brought together to create sales.

-

How Does Retailing Work?

-

Retailers rely on a system that supplies them with merchandise to market to consumers. To acquire inventory and ensure they have the products they want to sell, relationships must be established with businesses that operate within the retail supply chain.

-

 

-

The retail supply chain consists of manufacturers, wholesalers, retailers, and the consumer (end-user). The wholesaler is directly connected to the manufacturer, while the retailer is connected to the wholesaler.

-

The roles of the key players in a typical retail supply chain are:

-
- - -

List support:

-
    -
  1. This
  2. -
  3. is

  4. -
  5. an
  6. -
  7. - ordered -
      -
    • With

      ...
    • -
    • a
    • -
    • nested
    • -
    • unordered -
        -
      1. With a nested
      2. -
      3. ordered list
      4. -
      5. with a lower alpha list style
      6. -
      7. starting at letter e
      8. -
      -
    • -
    • list
    • -
    -
  8. -
  9. list! Lorem ipsum dolor sit amet.
  10. -
  11. Header 2

  12. -

  13. Header 2
  14. -
-

retail supply chain

-
- - - - '''; -const tableHtml = ''' - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
qwerq
- 2132312 - - - 1231wef - - 123456 - - 12345 - - 12345 - -
    -
  • 123
  • -
  • 1243
  • -
-
123
123 -
    -
  1. 12345
  2. -
  3. 32435
  4. -
-
- 213 - -

12345

-
- 213 - -
-

12345

-
-
- 213 - -
12345678
-
ksdlkjhs dajflh -

123

-
- 213 -
231
-

1231232basdvc ns/,vn d

-

vd vdfsbv'dsfv

-

a vb;sdf vbsd; vbfd; vbj

-
-
- -

Styled Complex/Nested Table

- - - - - - - - - - - - - - - - - - -
Caption-Nested Table
Column 1Column 2
Colspan Column
Rowspan CellCell 2
- - - - - - - - - -
Inner Column Heading 1Inner Column Heading 2
Inner Data Cell 1 - - - - - - - - - -
Inner Most Column Heading 1Inner Most Column Heading 2
Innermost Data Cell 1Innermost Data Cell 2
- -
-
- -

No style Nested table

-
 
 

paragraphs

 

words

 

bytes

 

lists

 

Start with 'Lorem
ipsum dolor sit amet...'

  
- - - - '''; - -const htmlData = r""" -

Scroll to bottom

-

Header 1

-

Header 2

-

Header 3

-

Header 4

-
Header 5
-
Header 6
- -

Inline Styles:

-

The should be BLUE style='color: blue;'

-

The should be RED style='color: red;'

-

The should be BLACK with 10% alpha style='color: rgba(0, 0, 0, 0.10);

-

The should be GREEN style='color: rgb(0, 97, 0);

-

The should be GREEN style='color: rgb(0, 97, 0);

- -

Text Alignment

-

Center Aligned Text

-

Right Aligned Text

-

Justified Text

-

Center Aligned Text

- -

Margins

-
Default Div (width 350px height 20px)
-
margin-left: 3em
-
margin: auto
-
margin: 15px auto
-
margin-left: auto
-
margin-right: auto
-
margin-left: auto; margin-right: 3em
- -

Margin Auto on Image

-

display:inline-block; margin: auto; (should not center):

- -

display:block margin: auto; (should center):

- - -

Support for sub/sup

- Solve for xn: log2(x2+n) = 93 -

One of the most common equations in all of physics is
E=mc2.

- -

Ruby Support:

-

- - 漢かん - 字 - -  is Japanese Kanji. -

- -

Support for maxLines:

-
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec vestibulum sapien feugiat lorem tempor, id porta orci elementum. Fusce sed justo id arcu egestas congue. Fusce tincidunt lacus ipsum, in imperdiet felis ultricies eu. In ullamcorper risus felis, ac maximus dui bibendum vel. Integer ligula tortor, facilisis eu mauris ut, ultrices hendrerit ex. Donec scelerisque massa consequat, eleifend mauris eu, mollis dui. Donec placerat augue tortor, et tincidunt quam tempus non. Quisque sagittis enim nisi, eu condimentum lacus egestas ac. Nam facilisis luctus ipsum, at aliquam urna fermentum a. Quisque tortor dui, faucibus in ante eget, pellentesque mattis nibh. In augue dolor, euismod vitae eleifend nec, tempus vel urna. Donec vitae augue accumsan ligula fringilla ultrices et vel ex.
- - -

Table support (With custom styling!):

- - - - - - - - - - - - - - - - - - - -
OneTwoThree
Rowspan
Rowspan
Rowspan
Rowspan
Rowspan
Rowspan
Rowspan
Rowspan
Rowspan
Rowspan
Rowspan
Rowspan
Rowspan
Rowspan
DataData
-For 50 years, WWF has been protecting the future of nature. -
fDatafDatafData
- -

List support:

-
    -
  1. This
  2. -
  3. is

  4. -
  5. an
  6. -
  7. - ordered -
      -
    • With

      ...
    • -
    • a
    • -
    • nested
    • -
    • unordered -
        -
      1. With a nested
      2. -
      3. ordered list
      4. -
      5. with a lower alpha list style
      6. -
      7. starting at letter e
      8. -
      -
    • -
    • list
    • -
    -
  8. -
  9. list! Lorem ipsum dolor sit amet.
  10. -
  11. Header 2

  12. -

  13. Header 2
  14. -
- -

Link support:

-

- Linking to websites has never been easier. -

- -

Image support:

- - - - - - - - - -
Network pngxkcd
Local asset png
Local asset svg
Data uri (with base64 support)Red dot (png) - Green dot (base64 svg) - Green dot (plain svg) -
Custom image render
Broken network imageBroken network image alt text
- -

SVG support:

- - - - - - -

Custom Element Support:

- Inline: <bird></bird> becomes: . -
- - Block: <flutter></flutter> becomes: - - and <flutter horizontal></flutter> becomes: - - -

MathML Support:

- - - x - = - - - - - - b - - ± - - - - b - 2 - - - - - 4 - - a - - c - - - - - - 2 - - a - - - - - - - - 0 - 5 - - - x - 2 - - - dx - = - [ - - 1 - 3 - - - x - 3 - - - ] - 0 - 5 - - = - - 125 - 3 - - - - 0 - = - - 125 - 3 - - -
- - - sin - 2 - - θ - + - - cos - 2 - - θ - = - 1 - - -

Tex Support with the custom tex tag:

- i\hbar\frac{\partial}{\partial t}\Psi(\vec x,t) = -\frac{\hbar}{2m}\nabla^2\Psi(\vec x,t)+ V(\vec x)\Psi(\vec x,t) -

blockquote:

-
-For 50 years, WWF has been protecting the future of nature. The world's leading conservation organization, WWF works in 100 countries and is supported by 1.2 million members in the United States and close to 5 million globally. -
-

Scroll to top

-"""; - -const testHtml = ''' -

 

Heading1 

Heading 2

Heading 3

Heading 4

Heading 2
Heading 2

 

Bold : 

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

 

Italic : 

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

 

Italic

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

 

 

Scratch

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

 

 

X2

56565676756566656

 

Left Align: 

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

 

Right Align: 

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

 

 

Center Align: 

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

 

 

Justify Align: 

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

 

 

Font: 

Comic: Lorem ipsum dolor sit amet, consectetur adipiscing elit, 

Courier new: sed do eiusmod tempor incididunt ut labore et dolore magna aliqua

Georgia: Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat

Verdana: Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

 

Font Size

Comic: Lorem ipsum dolor sit amet, consectetur adipiscing elit, 

Courier new: sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. 

Georgia: Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat

Verdana: Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

 

Color:

Red: Lorem ipsum dolor sit amet, consectetur adipiscing elit

Purple: sed do eiusmod tempor incididunt ut labore et dolore magna aliqua

Yellow: Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur Blue: sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

 

Color Background

Orange: nm,fnv,mnbgmbnmm

Red: Duis aute irure dolor in reprehenderit

Purple: Duis aute irure dolor in reprehenderit

Yellow: Duis aute irure dolor in reprehenderit

 

 

List-Disc

 

List-Circle

 

List - Square

 

List-Number

  1. Duis aute irure dolor in reprehenderit
  2. Duis aute irure dolor in reprehenderit
  3. Duis aute irure dolor in reprehenderit
  4. Duis aute irure dolor in reprehenderit
  5. Duis aute irure dolor in reprehenderit
  6. Duis aute irure dolor in reprehenderit

 

List - Alpha

  1. Duis aute irure dolor in reprehenderit
  2. Duis aute irure dolor in reprehenderit
  3. Duis aute irure dolor in reprehenderit
  4. Duis aute irure dolor in reprehenderit
  5. Duis aute irure dolor in reprehenderit
  6. Duis aute irure dolor in reprehenderit

Blockquote:

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

 

- - -Page Title - - - -

This is a Heading

-

This is a paragraph.

- - -

 

Test 1Test 1Test 1Test 1Test 1Test 1Test 1Test 1

Test Row Merge

Test Row Merge

Test Column Merge

Test Column Merge

Txt with Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

List-Numbered

  1. Test1
  2. tes2

List - Disc

  • test 1
  • test 2
Bold  Italic Underline Scratch123451234
       
        
        
        

Link:

https://zebra.com

 

Media: Audio

Media: Video

 

'''; - -class HtmlPreview extends StatelessWidget { - const HtmlPreview({super.key}); - - @override - Widget build(BuildContext context) { - final htmlList = [tableHtml, mediaHtml, html, htmlData, testHtml, imgHtml]; - return Scaffold( - backgroundColor: Theme.of(context).colorScheme.surface, - appBar: AppBar( - title: const Text('Html Preview'), - ), - body: ListView.separated( - itemBuilder: (BuildContext context, int index) { - final data = htmlList[index]; - return ZdsHtmlContainer( - data, - showReadMore: false, - ); - }, - itemCount: htmlList.length, - padding: EdgeInsets.zero, - separatorBuilder: (BuildContext context, int index) => - const Divider(thickness: 2).paddingOnly(bottom: 10, top: 10), - ), - // SingleChildScrollView(child: ZdsHtmlContainer(mediaHtml, containerWidth: MediaQuery.of(context).size.width,)), - ); - } -} diff --git a/example/linux/flutter/generated_plugin_registrant.cc b/example/linux/flutter/generated_plugin_registrant.cc index 158f759..9876374 100644 --- a/example/linux/flutter/generated_plugin_registrant.cc +++ b/example/linux/flutter/generated_plugin_registrant.cc @@ -7,16 +7,20 @@ #include "generated_plugin_registrant.h" #include -#include +#include +#include #include void fl_register_plugins(FlPluginRegistry* registry) { g_autoptr(FlPluginRegistrar) file_selector_linux_registrar = fl_plugin_registry_get_registrar_for_plugin(registry, "FileSelectorPlugin"); file_selector_plugin_register_with_registrar(file_selector_linux_registrar); - g_autoptr(FlPluginRegistrar) pasteboard_registrar = - fl_plugin_registry_get_registrar_for_plugin(registry, "PasteboardPlugin"); - pasteboard_plugin_register_with_registrar(pasteboard_registrar); + g_autoptr(FlPluginRegistrar) irondash_engine_context_registrar = + fl_plugin_registry_get_registrar_for_plugin(registry, "IrondashEngineContextPlugin"); + irondash_engine_context_plugin_register_with_registrar(irondash_engine_context_registrar); + g_autoptr(FlPluginRegistrar) super_native_extensions_registrar = + fl_plugin_registry_get_registrar_for_plugin(registry, "SuperNativeExtensionsPlugin"); + super_native_extensions_plugin_register_with_registrar(super_native_extensions_registrar); g_autoptr(FlPluginRegistrar) url_launcher_linux_registrar = fl_plugin_registry_get_registrar_for_plugin(registry, "UrlLauncherPlugin"); url_launcher_plugin_register_with_registrar(url_launcher_linux_registrar); diff --git a/example/linux/flutter/generated_plugins.cmake b/example/linux/flutter/generated_plugins.cmake index 93c755e..8aff642 100644 --- a/example/linux/flutter/generated_plugins.cmake +++ b/example/linux/flutter/generated_plugins.cmake @@ -4,7 +4,8 @@ list(APPEND FLUTTER_PLUGIN_LIST file_selector_linux - pasteboard + irondash_engine_context + super_native_extensions url_launcher_linux ) diff --git a/example/macos/Flutter/GeneratedPluginRegistrant.swift b/example/macos/Flutter/GeneratedPluginRegistrant.swift index 3bd4a32..efff74a 100644 --- a/example/macos/Flutter/GeneratedPluginRegistrant.swift +++ b/example/macos/Flutter/GeneratedPluginRegistrant.swift @@ -8,11 +8,12 @@ import Foundation import device_info_plus import file_selector_macos import flutter_image_compress_macos +import irondash_engine_context import package_info_plus -import pasteboard import path_provider_foundation import shared_preferences_foundation import sqflite +import super_native_extensions import url_launcher_macos import video_compress import video_player_avfoundation @@ -22,11 +23,12 @@ func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { DeviceInfoPlusMacosPlugin.register(with: registry.registrar(forPlugin: "DeviceInfoPlusMacosPlugin")) FileSelectorPlugin.register(with: registry.registrar(forPlugin: "FileSelectorPlugin")) FlutterImageCompressMacosPlugin.register(with: registry.registrar(forPlugin: "FlutterImageCompressMacosPlugin")) + IrondashEngineContextPlugin.register(with: registry.registrar(forPlugin: "IrondashEngineContextPlugin")) FPPPackageInfoPlusPlugin.register(with: registry.registrar(forPlugin: "FPPPackageInfoPlusPlugin")) - PasteboardPlugin.register(with: registry.registrar(forPlugin: "PasteboardPlugin")) PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin")) SharedPreferencesPlugin.register(with: registry.registrar(forPlugin: "SharedPreferencesPlugin")) SqflitePlugin.register(with: registry.registrar(forPlugin: "SqflitePlugin")) + SuperNativeExtensionsPlugin.register(with: registry.registrar(forPlugin: "SuperNativeExtensionsPlugin")) UrlLauncherPlugin.register(with: registry.registrar(forPlugin: "UrlLauncherPlugin")) VideoCompressPlugin.register(with: registry.registrar(forPlugin: "VideoCompressPlugin")) FVPVideoPlayerPlugin.register(with: registry.registrar(forPlugin: "FVPVideoPlayerPlugin")) diff --git a/example/pubspec.yaml b/example/pubspec.yaml index 5279f37..865a8d6 100644 --- a/example/pubspec.yaml +++ b/example/pubspec.yaml @@ -14,6 +14,10 @@ dependencies: intl: ^0.18.0 table_calendar: ^3.0.9 shared_preferences: ^2.2.2 + flutter_quill: ^9.2.2 + flutter_localizations: + sdk: flutter + zeta_flutter: ^0.1.1+1 zds_flutter: path: ../ diff --git a/example/windows/flutter/generated_plugin_registrant.cc b/example/windows/flutter/generated_plugin_registrant.cc index 7d98a88..3c20f2a 100644 --- a/example/windows/flutter/generated_plugin_registrant.cc +++ b/example/windows/flutter/generated_plugin_registrant.cc @@ -7,14 +7,17 @@ #include "generated_plugin_registrant.h" #include -#include +#include +#include #include void RegisterPlugins(flutter::PluginRegistry* registry) { FileSelectorWindowsRegisterWithRegistrar( registry->GetRegistrarForPlugin("FileSelectorWindows")); - PasteboardPluginRegisterWithRegistrar( - registry->GetRegistrarForPlugin("PasteboardPlugin")); + IrondashEngineContextPluginCApiRegisterWithRegistrar( + registry->GetRegistrarForPlugin("IrondashEngineContextPluginCApi")); + SuperNativeExtensionsPluginCApiRegisterWithRegistrar( + registry->GetRegistrarForPlugin("SuperNativeExtensionsPluginCApi")); UrlLauncherWindowsRegisterWithRegistrar( registry->GetRegistrarForPlugin("UrlLauncherWindows")); } diff --git a/example/windows/flutter/generated_plugins.cmake b/example/windows/flutter/generated_plugins.cmake index 722afbe..1e71556 100644 --- a/example/windows/flutter/generated_plugins.cmake +++ b/example/windows/flutter/generated_plugins.cmake @@ -4,7 +4,8 @@ list(APPEND FLUTTER_PLUGIN_LIST file_selector_windows - pasteboard + irondash_engine_context + super_native_extensions url_launcher_windows ) diff --git a/lib/src/components/atoms/button.dart b/lib/src/components/atoms/button.dart index bc84499..c922017 100644 --- a/lib/src/components/atoms/button.dart +++ b/lib/src/components/atoms/button.dart @@ -136,7 +136,7 @@ class ZdsButton extends StatelessWidget { isOnDarkBackground = false, isDangerButton = false; - /// The Widget that will go inside the button, typically a [Text] with style [Theme.textTheme.titleMedium]. + /// The Widget that will go inside the button, typically a [Text] with style [TextTheme.titleMedium]. /// /// Must not be null. final Widget child; diff --git a/lib/src/components/atoms/expandable.dart b/lib/src/components/atoms/expandable.dart index a24afd3..a02146f 100644 --- a/lib/src/components/atoms/expandable.dart +++ b/lib/src/components/atoms/expandable.dart @@ -15,7 +15,7 @@ const Duration _kFadeDuration = Duration(milliseconds: 200); /// /// See also: /// -/// * [readMore], an alternative way of making a collapsible widget. +/// * [ExpandableTextExtension.readMore], an alternative way of making a collapsible widget. class ZdsExpandable extends StatelessWidget { /// A widget that can be collapsed and expanded. const ZdsExpandable({ diff --git a/lib/src/components/atoms/unread_badge_widget.dart b/lib/src/components/atoms/unread_badge_widget.dart index b1d0fc6..0e63a48 100644 --- a/lib/src/components/atoms/unread_badge_widget.dart +++ b/lib/src/components/atoms/unread_badge_widget.dart @@ -99,7 +99,7 @@ class UnreadBadge extends StatelessWidget { : Directionality.of(context) == TextDirection.ltr ? '$maximumNumber+' : '+$maximumNumber', - textScaleFactor: MediaQuery.of(context).textScaleFactor > 1.35 ? 1.35 : null, + textScaler: MediaQuery.textScalerOf(context).clamp(maxScaleFactor: 1.35), style: themeData.textTheme.bodySmall?.copyWith( color: foregroundColor ?? (backgroundColor ?? themeData.colorScheme.error).onColor, fontSize: max(themeData.textTheme.bodySmall?.fontSize ?? 0, minHeight * 0.65), diff --git a/lib/src/components/molecules/block_table.dart b/lib/src/components/molecules/block_table.dart index bb28775..0f6a793 100644 --- a/lib/src/components/molecules/block_table.dart +++ b/lib/src/components/molecules/block_table.dart @@ -2,7 +2,7 @@ import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; import 'package:linked_scroll_controller/linked_scroll_controller.dart'; -import '../../../../zds_flutter.dart'; +import '../../../zds_flutter.dart'; /// Defines a header for a [ZdsBlockTable] class ZdsBlockTableHeader { @@ -139,7 +139,7 @@ class _BlockTable extends State with WidgetsBindingObserver { _tableBody = _controllers.addAndGet(); WidgetsBinding.instance.addPostFrameCallback((Duration timeStamp) { - headerHeight = widget.rowHeaderHeight * MediaQuery.of(context).textScaleFactor; + headerHeight = widget.rowHeaderHeight; buildTable(); }); @@ -230,7 +230,7 @@ class _BlockTable extends State with WidgetsBindingObserver { Container( alignment: Alignment.center, width: _getDayColumnWidth(), - height: 28 * MediaQuery.of(context).textScaleFactor, + height: 28, color: themeData.colorScheme.surface, child: Text( items[index].text, @@ -416,7 +416,7 @@ class _BlockTable extends State with WidgetsBindingObserver { return Container( alignment: Alignment.center, width: _getAssocColumnWidth(), - height: 28 * MediaQuery.of(context).textScaleFactor, + height: 28, color: Theme.of(context).colorScheme.surface, ).paddingOnly(right: 1); } diff --git a/lib/src/components/molecules/date_range_picker.dart b/lib/src/components/molecules/date_range_picker.dart index ce0db05..0bf679d 100644 --- a/lib/src/components/molecules/date_range_picker.dart +++ b/lib/src/components/molecules/date_range_picker.dart @@ -10,7 +10,6 @@ import 'package:flutter/gestures.dart' show DragStartBehavior; import 'package:flutter/material.dart'; import 'package:flutter/rendering.dart'; import 'package:flutter/services.dart'; - import '../../../zds_flutter.dart'; const Size _calendarPortraitDialogSize = Size(330, 518); @@ -257,10 +256,6 @@ class _DatePickerDialogState extends State with RestorationMix final MaterialLocalizations localizations = MaterialLocalizations.of(context); final Orientation orientation = MediaQuery.of(context).orientation; final TextTheme textTheme = theme.textTheme; - // Constrain the textScaleFactor to the largest supported value to prevent - // layout issues. - final double textScaleFactor = math.min(MediaQuery.of(context).textScaleFactor, 1.3); - final String dateText = localizations.formatMediumDate(_selectedDate.value); final Color onPrimarySurface = colorScheme.brightness == Brightness.light ? colorScheme.onPrimary : colorScheme.onSurface; @@ -371,7 +366,7 @@ class _DatePickerDialogState extends State with RestorationMix entryModeButton: entryModeButton, ); - final Size dialogSize = _dialogSize(context) * textScaleFactor; + final Size dialogSize = _dialogSize(context); return Dialog( insetPadding: const EdgeInsets.symmetric(horizontal: 16, vertical: 24), clipBehavior: Clip.antiAlias, @@ -382,7 +377,7 @@ class _DatePickerDialogState extends State with RestorationMix curve: Curves.easeIn, child: MediaQuery( data: MediaQuery.of(context).copyWith( - textScaleFactor: textScaleFactor, + textScaler: MediaQuery.textScalerOf(context).clamp(maxScaleFactor: 1.3), ), child: Builder( builder: (BuildContext context) { @@ -1305,7 +1300,6 @@ class _ZdsDateRangePickerDialogState extends State wit Widget build(BuildContext context) { final MediaQueryData mediaQuery = MediaQuery.of(context); final Orientation orientation = mediaQuery.orientation; - final double textScaleFactor = math.min(mediaQuery.textScaleFactor, 1.3); final MaterialLocalizations localizations = MaterialLocalizations.of(context); final ColorScheme colorScheme = Theme.of(context).colorScheme; final Color onPrimarySurface = @@ -1427,7 +1421,7 @@ class _ZdsDateRangePickerDialogState extends State wit curve: Curves.easeIn, child: MediaQuery( data: MediaQuery.of(context).copyWith( - textScaleFactor: textScaleFactor, + textScaler: MediaQuery.textScalerOf(context).clamp(maxScaleFactor: 1.3), ), child: Builder( builder: (BuildContext context) { diff --git a/lib/src/components/molecules/fields_list_tile.dart b/lib/src/components/molecules/fields_list_tile.dart index 239b115..16a90f3 100644 --- a/lib/src/components/molecules/fields_list_tile.dart +++ b/lib/src/components/molecules/fields_list_tile.dart @@ -62,7 +62,7 @@ class ZdsFieldsListTile extends StatelessWidget { /// The textStyle used for the starting elements of each field. /// - /// Defaults to [TextTheme.titleSmall] with [$color.zeta.text.default] color. + /// Defaults to [TextTheme.titleSmall] with [ZetaColorSwatch.text] color. final TextStyle? fieldsStartTextStyle; /// The textStyle used for the end elements of each field. diff --git a/lib/src/components/molecules/network_avatar.dart b/lib/src/components/molecules/network_avatar.dart index ce39dad..5e61dda 100644 --- a/lib/src/components/molecules/network_avatar.dart +++ b/lib/src/components/molecules/network_avatar.dart @@ -74,7 +74,7 @@ class ZdsNetworkAvatar extends StatelessWidget implements PreferredSizeWidget { final Center initialsWidget = Center( child: Text( initials, - textScaleFactor: 1, + textScaler: MediaQuery.textScalerOf(context).clamp(maxScaleFactor: 1), style: textStyle ?? themeData.textTheme.displaySmall?.copyWith( color: (backgroundColor ?? themeData.colorScheme.secondary).onColor, diff --git a/lib/src/components/molecules/search.dart b/lib/src/components/molecules/search.dart index c34f82d..6b77ee0 100644 --- a/lib/src/components/molecules/search.dart +++ b/lib/src/components/molecules/search.dart @@ -5,7 +5,7 @@ import '../../../../zds_flutter.dart'; /// Variants of [ZdsSearchField]. enum ZdsSearchFieldVariant { - /// Creates a Search field with a border on all edges of color [ZetaColors.warm.60]. + /// Creates a Search field with a border on all edges of color `ZetaColors.warm.60`. outlined, /// Creates a Search field with a box shadow around the edges with a radius of 4. diff --git a/lib/src/components/molecules/selectable_list_tile.dart b/lib/src/components/molecules/selectable_list_tile.dart index 6b0ec0c..51f7bd3 100644 --- a/lib/src/components/molecules/selectable_list_tile.dart +++ b/lib/src/components/molecules/selectable_list_tile.dart @@ -7,8 +7,8 @@ import '../../../../zds_flutter.dart'; /// /// There are two variants: /// * [ZdsSelectableListTile], which returns a list tile that changes its color when selected. -/// When a listTile is marked as selected, its background will be colored with the [Theme.colorScheme.secondary] at 10% -/// opacity. When it's unselected, the background will use [Theme.colorScheme.surface] +/// When a listTile is marked as selected, its background will be colored with the [ColorScheme.secondary] at 10% +/// opacity. When it's unselected, the background will use [ColorScheme.surface] /// * [ZdsSelectableListTile.checkable], which returns a list tile that adds a check at the end of the tile when selected. /// /// This widget does not manage its own state, but should rather be rebuilt by the parent widget's state through diff --git a/lib/src/components/molecules/sheet_header.dart b/lib/src/components/molecules/sheet_header.dart index da04808..3c7f422 100644 --- a/lib/src/components/molecules/sheet_header.dart +++ b/lib/src/components/molecules/sheet_header.dart @@ -56,7 +56,7 @@ class ZdsSheetHeader extends StatelessWidget implements PreferredSizeWidget { headerText, style: headerTextStyle ?? themeData.textTheme.headlineMedium, overflow: TextOverflow.ellipsis, - textScaleFactor: MediaQuery.of(context).textScaleFactor > 2 ? 2 : null, + textScaler: MediaQuery.textScalerOf(context).clamp(maxScaleFactor: 2), ), ).paddingOnly(bottom: 5), if (leading != null) diff --git a/lib/src/components/molecules/slidable_list_tile.dart b/lib/src/components/molecules/slidable_list_tile.dart index 227e09e..eed5dde 100644 --- a/lib/src/components/molecules/slidable_list_tile.dart +++ b/lib/src/components/molecules/slidable_list_tile.dart @@ -307,9 +307,8 @@ class CustomSlidableAction extends StatelessWidget { /// {@template slidable.actions.foregroundColor} /// The foreground color of this action. /// - /// Defaults to [Colors.black] if [backgroundColor]'s brightness is - /// [Brightness.light], or to [Colors.white] if [backgroundColor]'s brightness is - /// [Brightness.dark]. + /// Defaults to [Colors.black] if the background brightness is [Brightness.light], + /// or to [Colors.white] if background brightness is [Brightness.dark].s /// {@endtemplate} final Color? foregroundColor; diff --git a/lib/src/components/molecules/stats_card.dart b/lib/src/components/molecules/stats_card.dart index a9cca4b..b138589 100644 --- a/lib/src/components/molecules/stats_card.dart +++ b/lib/src/components/molecules/stats_card.dart @@ -52,10 +52,9 @@ class ZdsStatCard extends StatelessWidget { final ZdsCardVariant? cardVariant; bool _isVertical(BuildContext context, BoxConstraints constraints) { - final double scale = MediaQuery.of(context).textScaleFactor; final double totalPadding = stats.length * 2 * _padding; final double totalDividers = _dividerWidth * 0.5 * (stats.length - 1); - final double width = ((totalDividers + totalPadding - constraints.maxWidth) / -stats.length) / scale; + final double width = (totalDividers + totalPadding - constraints.maxWidth) / -stats.length; for (int i = 0; i < stats.length; i++) { final bool description = hasTextOverflow(stats[i].description, Theme.of(context).textTheme.bodySmall!, width); final bool value = hasTextOverflow( diff --git a/lib/src/components/organisms/bottom_tab_bar.dart b/lib/src/components/organisms/bottom_tab_bar.dart index d392f97..629c2d2 100644 --- a/lib/src/components/organisms/bottom_tab_bar.dart +++ b/lib/src/components/organisms/bottom_tab_bar.dart @@ -190,7 +190,7 @@ class _ZdsBottomTabBarTile extends StatelessWidget { child: Text( label, style: labelStyle, - textScaleFactor: MediaQuery.of(context).textScaleFactor > 1.35 ? 1.35 : null, + textScaler: MediaQuery.textScalerOf(context).clamp(maxScaleFactor: 1.35), ), ), ], diff --git a/lib/src/components/organisms/date_range_picker_tile.dart b/lib/src/components/organisms/date_range_picker_tile.dart index b1b7d44..9a6329e 100644 --- a/lib/src/components/organisms/date_range_picker_tile.dart +++ b/lib/src/components/organisms/date_range_picker_tile.dart @@ -105,9 +105,8 @@ class ZdsDateRangePickerTileForm extends FormField { BuildContext context, BoxConstraints constraints, ) { - final double scale = MediaQuery.of(context).textScaleFactor; - final double width = _calculateWidth(constraints, scale); - final bool isColumn = constraints.maxWidth <= _screenColumnBreakpoint * scale; + final double width = _calculateWidth(constraints); + final bool isColumn = constraints.maxWidth <= _screenColumnBreakpoint; final List fields = [ _DateField( date: state.value?.start ?? initialValue.start, @@ -123,7 +122,6 @@ class ZdsDateRangePickerTileForm extends FormField { validator: (DateTime? value) => state.hasError ? '' : null, isInitialDate: true, width: width, - scale: scale, startDayOfWeek: startDayOfWeek, okClickText: okClickText, cancelClickText: cancelClickText, @@ -145,7 +143,6 @@ class ZdsDateRangePickerTileForm extends FormField { ); }, width: width, - scale: scale, startDayOfWeek: startDayOfWeek, okClickText: okClickText, cancelClickText: cancelClickText, @@ -335,13 +332,13 @@ class ZdsDateRangePickerTile extends StatefulWidget { } } -double _calculateWidth(BoxConstraints constraints, double scale) { - final double maxWidthScale = _screenColumnBreakpoint * scale; - final double maxScale = (_screenColumnBreakpoint / 2) * scale; +double _calculateWidth(BoxConstraints constraints) { + const double maxWidthScale = _screenColumnBreakpoint; + const double maxScale = _screenColumnBreakpoint / 2; if (constraints.maxWidth < maxWidthScale) { return maxWidthScale.clamp(0, maxScale); } else { - final double calculatedWidth = ((constraints.maxWidth - _padding) / 2) * scale; + final double calculatedWidth = (constraints.maxWidth - _padding) / 2; return calculatedWidth.clamp(0, maxScale); } } @@ -389,9 +386,8 @@ class _ZdsDateRangePickerTileState extends State { autovalidateMode: AutovalidateMode.onUserInteraction, child: LayoutBuilder( builder: (BuildContext context, BoxConstraints constraints) { - final double scale = MediaQuery.of(context).textScaleFactor; - final double width = _calculateWidth(constraints, scale); - final bool isColumn = constraints.maxWidth <= _screenColumnBreakpoint * scale; + final double width = _calculateWidth(constraints); + final bool isColumn = constraints.maxWidth <= _screenColumnBreakpoint; final List fields = [ _DateField( date: initialDate, @@ -412,7 +408,6 @@ class _ZdsDateRangePickerTileState extends State { }, isInitialDate: true, width: width, - scale: scale, startDayOfWeek: widget.startDayOfWeek, okClickText: widget.okClickText, cancelClickText: widget.cancelClickText, @@ -439,7 +434,6 @@ class _ZdsDateRangePickerTileState extends State { return null; }, width: width, - scale: scale, startDayOfWeek: widget.startDayOfWeek, okClickText: widget.okClickText, cancelClickText: widget.cancelClickText, @@ -487,7 +481,6 @@ class _DateField extends StatelessWidget { required this.date, required this.format, required this.width, - required this.scale, this.validator, this.initialSelectableDate, this.finalSelectableDate, @@ -507,7 +500,6 @@ class _DateField extends StatelessWidget { final String format; final String? helpText; final double width; - final double scale; final String? Function(DateTime?)? validator; /// Starting day of week 1, 2, 3, Sunday, Monday, Tuesday respectively. @@ -586,13 +578,12 @@ class _DateField extends StatelessWidget { mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ SizedBox( - height: _fontLineHeight * scale, + height: _fontLineHeight, child: date != null ? Text( date!.format(format), style: Theme.of(context).textTheme.bodyLarge?.copyWith( - height: - (_fontLineHeight / Theme.of(context).textTheme.bodyLarge!.fontSize!) / scale, + height: _fontLineHeight / Theme.of(context).textTheme.bodyLarge!.fontSize!, ), ) : null, @@ -646,7 +637,6 @@ class _DateField extends StatelessWidget { ..add(StringProperty('format', format)) ..add(StringProperty('helpText', helpText)) ..add(DoubleProperty('width', width)) - ..add(DoubleProperty('scale', scale)) ..add( ObjectFlagProperty.has( 'validator', diff --git a/lib/src/components/organisms/day_picker.dart b/lib/src/components/organisms/day_picker.dart index 8c5a78b..fdff9a1 100644 --- a/lib/src/components/organisms/day_picker.dart +++ b/lib/src/components/organisms/day_picker.dart @@ -234,7 +234,7 @@ class _ZdsDayPickerState extends State { Widget build(BuildContext context) { return LayoutBuilder( builder: (BuildContext context, BoxConstraints constraints) { - final double pillWidth = 68 * MediaQuery.of(context).textScaleFactor; + const double pillWidth = 68; const int pillSpacing = 4; const double horizontalPadding = 12; diff --git a/lib/src/components/organisms/file_picker/file_picker.dart b/lib/src/components/organisms/file_picker/file_picker.dart index f4e87a7..1c20737 100644 --- a/lib/src/components/organisms/file_picker/file_picker.dart +++ b/lib/src/components/organisms/file_picker/file_picker.dart @@ -248,7 +248,7 @@ class ZdsFilePicker extends StatefulWidget { /// List of processes a file should undergo post getting picked from file picker /// - /// Defaults to [zds DefaultPostProcessors] + /// Defaults to [zdsDefaultPostProcessors] final List? postProcessors; /// Validations that are needed to be performed on a file @@ -258,7 +258,7 @@ class ZdsFilePicker extends StatefulWidget { /// A function called whenever any exception is thrown in selection process /// - /// Defaults to [zds FileError] + /// Defaults to [zdsFileError] final void Function(BuildContext context, FilePickerConfig config, Exception exception)? onError; @override @@ -781,7 +781,7 @@ extension on ZdsFilePickerState { maxLines: 1, overflow: TextOverflow.ellipsis, style: style?.copyWith(color: zetaColors.textSubtle), - textScaleFactor: MediaQuery.of(context).textScaleFactor > 2.7 ? 2.7 : null, + textScaler: MediaQuery.textScalerOf(context).clamp(maxScaleFactor: 2.7), ), ], ], diff --git a/lib/src/components/organisms/fiscal_date_picker.dart b/lib/src/components/organisms/fiscal_date_picker.dart index 942f881..539443c 100644 --- a/lib/src/components/organisms/fiscal_date_picker.dart +++ b/lib/src/components/organisms/fiscal_date_picker.dart @@ -1,5 +1,3 @@ -import 'dart:math' as math; - import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; import 'package:table_calendar/table_calendar.dart'; @@ -129,7 +127,6 @@ class _ZdsDatePickerDialogState extends State { Widget build(BuildContext context) { final Orientation orientation = MediaQuery.of(context).orientation; final Size size = orientation == Orientation.portrait ? _inputPortraitDialogSize : _inputRangeLandscapeDialogSize; - final double textScaleFactor = math.min(MediaQuery.of(context).textScaleFactor, 1.3); final theme = Theme.of(context); final fixContent = [ @@ -220,7 +217,7 @@ class _ZdsDatePickerDialogState extends State { curve: Curves.easeIn, child: MediaQuery( data: MediaQuery.of(context).copyWith( - textScaleFactor: textScaleFactor, + textScaler: MediaQuery.textScalerOf(context).clamp(maxScaleFactor: 1.3), ), child: Builder( builder: (BuildContext context) { diff --git a/lib/src/utils/tools/nested_flow.dart b/lib/src/utils/tools/nested_flow.dart index cc2c472..47277aa 100644 --- a/lib/src/utils/tools/nested_flow.dart +++ b/lib/src/utils/tools/nested_flow.dart @@ -70,13 +70,15 @@ class ZdsNestedFlowState extends State { @override Widget build(BuildContext context) { - return WillPopScope( - onWillPop: () async { + return PopScope( + canPop: false, + onPopInvoked: (_) async { if (_navigator.currentState?.canPop() ?? false) { await _navigator.currentState?.maybePop(); - return false; } - return widget.shouldClose; + if (widget.shouldClose && context.mounted) { + Navigator.of(context).pop(); + } }, child: Navigator( key: _navigator, diff --git a/pubspec.yaml b/pubspec.yaml index 4815949..9c1ecca 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -39,7 +39,7 @@ dependencies: flutter_layout_grid: ^2.0.5 flutter_localizations: sdk: flutter - flutter_quill: 7.4.16 + flutter_quill: ^9.2.2 flutter_slidable: ^3.0.0 flutter_svg: ^2.0.7 flutter_swipe_action_cell: ^3.0.2