Showing
3 changed files
with
272 additions
and
158 deletions
| @@ -6,8 +6,11 @@ | @@ -6,8 +6,11 @@ | ||
| 6 | </configurations> | 6 | </configurations> |
| 7 | </component> | 7 | </component> |
| 8 | <component name="ChangeListManager"> | 8 | <component name="ChangeListManager"> |
| 9 | - <list default="true" id="4b1e7c8a-90e5-4705-b34f-bcaa595e12fe" name="Default" comment=""> | ||
| 10 | - <change beforePath="$PROJECT_DIR$/example/lib/main.dart" beforeDir="false" afterPath="$PROJECT_DIR$/example/lib/main.dart" afterDir="false" /> | 9 | + <list default="true" id="4b1e7c8a-90e5-4705-b34f-bcaa595e12fe" name="Default" comment="readme"> |
| 10 | + <change afterPath="$PROJECT_DIR$/README_CN.md" afterDir="false" /> | ||
| 11 | + <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" /> | ||
| 12 | + <change beforePath="$PROJECT_DIR$/README-EN.md" beforeDir="false" /> | ||
| 13 | + <change beforePath="$PROJECT_DIR$/README.md" beforeDir="false" afterPath="$PROJECT_DIR$/README.md" afterDir="false" /> | ||
| 11 | </list> | 14 | </list> |
| 12 | <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" /> | 15 | <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" /> |
| 13 | <option name="TRACKING_ENABLED" value="true" /> | 16 | <option name="TRACKING_ENABLED" value="true" /> |
| @@ -18,23 +21,29 @@ | @@ -18,23 +21,29 @@ | ||
| 18 | </component> | 21 | </component> |
| 19 | <component name="FileEditorManager"> | 22 | <component name="FileEditorManager"> |
| 20 | <leaf SIDE_TABS_SIZE_LIMIT_KEY="300"> | 23 | <leaf SIDE_TABS_SIZE_LIMIT_KEY="300"> |
| 21 | - <file leaf-file-name="main.dart" pinned="false" current-in-tab="true"> | ||
| 22 | - <entry file="file://$PROJECT_DIR$/example/lib/main.dart"> | 24 | + <file leaf-file-name="pubspec.yaml" pinned="false" current-in-tab="false"> |
| 25 | + <entry file="file://$PROJECT_DIR$/pubspec.yaml"> | ||
| 23 | <provider selected="true" editor-type-id="text-editor"> | 26 | <provider selected="true" editor-type-id="text-editor"> |
| 24 | - <state relative-caret-position="432"> | ||
| 25 | - <caret line="86" column="12" selection-start-line="86" selection-start-column="12" selection-end-line="86" selection-end-column="12" /> | ||
| 26 | - <folding> | ||
| 27 | - <element signature="e#0#39#0" expanded="true" /> | ||
| 28 | - </folding> | 27 | + <state relative-caret-position="270"> |
| 28 | + <caret line="10" column="10" lean-forward="true" selection-start-line="10" selection-start-column="10" selection-end-line="10" selection-end-column="10" /> | ||
| 29 | </state> | 29 | </state> |
| 30 | </provider> | 30 | </provider> |
| 31 | </entry> | 31 | </entry> |
| 32 | </file> | 32 | </file> |
| 33 | - <file leaf-file-name="pubspec.yaml" pinned="false" current-in-tab="false"> | ||
| 34 | - <entry file="file://$PROJECT_DIR$/pubspec.yaml"> | 33 | + <file leaf-file-name="README.md" pinned="false" current-in-tab="false"> |
| 34 | + <entry file="file://$PROJECT_DIR$/README.md"> | ||
| 35 | <provider selected="true" editor-type-id="text-editor"> | 35 | <provider selected="true" editor-type-id="text-editor"> |
| 36 | - <state relative-caret-position="432"> | ||
| 37 | - <caret line="16" selection-start-line="16" selection-end-line="16" /> | 36 | + <state relative-caret-position="108"> |
| 37 | + <caret line="4" column="17" selection-start-line="4" selection-start-column="17" selection-end-line="4" selection-end-column="17" /> | ||
| 38 | + </state> | ||
| 39 | + </provider> | ||
| 40 | + </entry> | ||
| 41 | + </file> | ||
| 42 | + <file leaf-file-name="README_CN.md" pinned="false" current-in-tab="true"> | ||
| 43 | + <entry file="file://$PROJECT_DIR$/README_CN.md"> | ||
| 44 | + <provider selected="true" editor-type-id="text-editor"> | ||
| 45 | + <state relative-caret-position="81"> | ||
| 46 | + <caret line="3" lean-forward="true" selection-start-line="3" selection-end-line="3" /> | ||
| 38 | </state> | 47 | </state> |
| 39 | </provider> | 48 | </provider> |
| 40 | </entry> | 49 | </entry> |
| @@ -72,9 +81,10 @@ | @@ -72,9 +81,10 @@ | ||
| 72 | <option value="$PROJECT_DIR$/CHANGELOG.md" /> | 81 | <option value="$PROJECT_DIR$/CHANGELOG.md" /> |
| 73 | <option value="$PROJECT_DIR$/pubspec.yaml" /> | 82 | <option value="$PROJECT_DIR$/pubspec.yaml" /> |
| 74 | <option value="$PROJECT_DIR$/LICENSE" /> | 83 | <option value="$PROJECT_DIR$/LICENSE" /> |
| 75 | - <option value="$PROJECT_DIR$/README.md" /> | ||
| 76 | <option value="$PROJECT_DIR$/README-EN.md" /> | 84 | <option value="$PROJECT_DIR$/README-EN.md" /> |
| 77 | <option value="$PROJECT_DIR$/example/lib/main.dart" /> | 85 | <option value="$PROJECT_DIR$/example/lib/main.dart" /> |
| 86 | + <option value="$PROJECT_DIR$/README.md" /> | ||
| 87 | + <option value="$PROJECT_DIR$/README_CN.md" /> | ||
| 78 | </list> | 88 | </list> |
| 79 | </option> | 89 | </option> |
| 80 | </component> | 90 | </component> |
| @@ -98,17 +108,6 @@ | @@ -98,17 +108,6 @@ | ||
| 98 | <item name="flutter_ScreenUtil" type="b2602c69:ProjectViewProjectNode" /> | 108 | <item name="flutter_ScreenUtil" type="b2602c69:ProjectViewProjectNode" /> |
| 99 | <item name="flutter_ScreenUtil" type="462c0819:PsiDirectoryNode" /> | 109 | <item name="flutter_ScreenUtil" type="462c0819:PsiDirectoryNode" /> |
| 100 | </path> | 110 | </path> |
| 101 | - <path> | ||
| 102 | - <item name="flutter_ScreenUtil" type="b2602c69:ProjectViewProjectNode" /> | ||
| 103 | - <item name="flutter_ScreenUtil" type="462c0819:PsiDirectoryNode" /> | ||
| 104 | - <item name="example" type="462c0819:PsiDirectoryNode" /> | ||
| 105 | - </path> | ||
| 106 | - <path> | ||
| 107 | - <item name="flutter_ScreenUtil" type="b2602c69:ProjectViewProjectNode" /> | ||
| 108 | - <item name="flutter_ScreenUtil" type="462c0819:PsiDirectoryNode" /> | ||
| 109 | - <item name="example" type="462c0819:PsiDirectoryNode" /> | ||
| 110 | - <item name="lib" type="462c0819:PsiDirectoryNode" /> | ||
| 111 | - </path> | ||
| 112 | </expand> | 111 | </expand> |
| 113 | <select /> | 112 | <select /> |
| 114 | </subPane> | 113 | </subPane> |
| @@ -135,6 +134,116 @@ | @@ -135,6 +134,116 @@ | ||
| 135 | <recent name="F:\screenutil" /> | 134 | <recent name="F:\screenutil" /> |
| 136 | </key> | 135 | </key> |
| 137 | </component> | 136 | </component> |
| 137 | + <component name="RestoreUpdateTree" date="Moments ago" ActionInfo="_Update"> | ||
| 138 | + <UpdatedFiles> | ||
| 139 | + <FILE-GROUP> | ||
| 140 | + <option name="myUpdateName" value="Updated from server" /> | ||
| 141 | + <option name="myStatusName" value="Changed on server" /> | ||
| 142 | + <option name="mySupportsDeletion" value="false" /> | ||
| 143 | + <option name="myCanBeAbsent" value="false" /> | ||
| 144 | + <option name="myId" value="CHANGED_ON_SERVER" /> | ||
| 145 | + <FILE-GROUP> | ||
| 146 | + <option name="myUpdateName" value="Updated" /> | ||
| 147 | + <option name="myStatusName" value="Changed" /> | ||
| 148 | + <option name="mySupportsDeletion" value="false" /> | ||
| 149 | + <option name="myCanBeAbsent" value="false" /> | ||
| 150 | + <option name="myId" value="UPDATED" /> | ||
| 151 | + <PATH vcs="Git" revision="">$PROJECT_DIR$/example/README.md</PATH> | ||
| 152 | + </FILE-GROUP> | ||
| 153 | + <FILE-GROUP> | ||
| 154 | + <option name="myUpdateName" value="Created" /> | ||
| 155 | + <option name="myStatusName" value="Created" /> | ||
| 156 | + <option name="mySupportsDeletion" value="false" /> | ||
| 157 | + <option name="myCanBeAbsent" value="false" /> | ||
| 158 | + <option name="myId" value="CREATED" /> | ||
| 159 | + </FILE-GROUP> | ||
| 160 | + <FILE-GROUP> | ||
| 161 | + <option name="myUpdateName" value="Deleted" /> | ||
| 162 | + <option name="myStatusName" value="Deleted" /> | ||
| 163 | + <option name="mySupportsDeletion" value="false" /> | ||
| 164 | + <option name="myCanBeAbsent" value="true" /> | ||
| 165 | + <option name="myId" value="REMOVED_FROM_REPOSITORY" /> | ||
| 166 | + </FILE-GROUP> | ||
| 167 | + <FILE-GROUP> | ||
| 168 | + <option name="myUpdateName" value="Restored" /> | ||
| 169 | + <option name="myStatusName" value="Will be restored" /> | ||
| 170 | + <option name="mySupportsDeletion" value="false" /> | ||
| 171 | + <option name="myCanBeAbsent" value="false" /> | ||
| 172 | + <option name="myId" value="RESTORED" /> | ||
| 173 | + </FILE-GROUP> | ||
| 174 | + </FILE-GROUP> | ||
| 175 | + <FILE-GROUP> | ||
| 176 | + <option name="myUpdateName" value="Modified" /> | ||
| 177 | + <option name="myStatusName" value="Modified" /> | ||
| 178 | + <option name="mySupportsDeletion" value="false" /> | ||
| 179 | + <option name="myCanBeAbsent" value="false" /> | ||
| 180 | + <option name="myId" value="MODIFIED" /> | ||
| 181 | + </FILE-GROUP> | ||
| 182 | + <FILE-GROUP> | ||
| 183 | + <option name="myUpdateName" value="Skipped" /> | ||
| 184 | + <option name="myStatusName" value="Skipped" /> | ||
| 185 | + <option name="mySupportsDeletion" value="false" /> | ||
| 186 | + <option name="myCanBeAbsent" value="false" /> | ||
| 187 | + <option name="myId" value="SKIPPED" /> | ||
| 188 | + </FILE-GROUP> | ||
| 189 | + <FILE-GROUP> | ||
| 190 | + <option name="myUpdateName" value="Merged with conflicts" /> | ||
| 191 | + <option name="myStatusName" value="Will be merged with conflicts" /> | ||
| 192 | + <option name="mySupportsDeletion" value="false" /> | ||
| 193 | + <option name="myCanBeAbsent" value="false" /> | ||
| 194 | + <option name="myId" value="MERGED_WITH_CONFLICTS" /> | ||
| 195 | + </FILE-GROUP> | ||
| 196 | + <FILE-GROUP> | ||
| 197 | + <option name="myUpdateName" value="Merged with tree conflicts" /> | ||
| 198 | + <option name="myStatusName" value="Merged with tree conflicts" /> | ||
| 199 | + <option name="mySupportsDeletion" value="false" /> | ||
| 200 | + <option name="myCanBeAbsent" value="false" /> | ||
| 201 | + <option name="myId" value="MERGED_WITH_TREE_CONFLICT" /> | ||
| 202 | + </FILE-GROUP> | ||
| 203 | + <FILE-GROUP> | ||
| 204 | + <option name="myUpdateName" value="Merged with property conflicts" /> | ||
| 205 | + <option name="myStatusName" value="Will be merged with property conflicts" /> | ||
| 206 | + <option name="mySupportsDeletion" value="false" /> | ||
| 207 | + <option name="myCanBeAbsent" value="false" /> | ||
| 208 | + <option name="myId" value="MERGED_WITH_PROPERTY_CONFLICT" /> | ||
| 209 | + </FILE-GROUP> | ||
| 210 | + <FILE-GROUP> | ||
| 211 | + <option name="myUpdateName" value="Merged" /> | ||
| 212 | + <option name="myStatusName" value="Will be merged" /> | ||
| 213 | + <option name="mySupportsDeletion" value="false" /> | ||
| 214 | + <option name="myCanBeAbsent" value="false" /> | ||
| 215 | + <option name="myId" value="MERGED" /> | ||
| 216 | + </FILE-GROUP> | ||
| 217 | + <FILE-GROUP> | ||
| 218 | + <option name="myUpdateName" value="Not in repository" /> | ||
| 219 | + <option name="myStatusName" value="Not in repository" /> | ||
| 220 | + <option name="mySupportsDeletion" value="true" /> | ||
| 221 | + <option name="myCanBeAbsent" value="false" /> | ||
| 222 | + <option name="myId" value="UNKNOWN" /> | ||
| 223 | + </FILE-GROUP> | ||
| 224 | + <FILE-GROUP> | ||
| 225 | + <option name="myUpdateName" value="Locally added" /> | ||
| 226 | + <option name="myStatusName" value="Locally added" /> | ||
| 227 | + <option name="mySupportsDeletion" value="false" /> | ||
| 228 | + <option name="myCanBeAbsent" value="false" /> | ||
| 229 | + <option name="myId" value="LOCALLY_ADDED" /> | ||
| 230 | + </FILE-GROUP> | ||
| 231 | + <FILE-GROUP> | ||
| 232 | + <option name="myUpdateName" value="Locally removed" /> | ||
| 233 | + <option name="myStatusName" value="Locally removed" /> | ||
| 234 | + <option name="mySupportsDeletion" value="false" /> | ||
| 235 | + <option name="myCanBeAbsent" value="false" /> | ||
| 236 | + <option name="myId" value="LOCALLY_REMOVED" /> | ||
| 237 | + </FILE-GROUP> | ||
| 238 | + <FILE-GROUP> | ||
| 239 | + <option name="myUpdateName" value="Switched" /> | ||
| 240 | + <option name="myStatusName" value="Switched" /> | ||
| 241 | + <option name="mySupportsDeletion" value="false" /> | ||
| 242 | + <option name="myCanBeAbsent" value="false" /> | ||
| 243 | + <option name="myId" value="SWITCHED" /> | ||
| 244 | + </FILE-GROUP> | ||
| 245 | + </UpdatedFiles> | ||
| 246 | + </component> | ||
| 138 | <component name="RunDashboard"> | 247 | <component name="RunDashboard"> |
| 139 | <option name="ruleStates"> | 248 | <option name="ruleStates"> |
| 140 | <list> | 249 | <list> |
| @@ -324,7 +433,14 @@ | @@ -324,7 +433,14 @@ | ||
| 324 | <option name="project" value="LOCAL" /> | 433 | <option name="project" value="LOCAL" /> |
| 325 | <updated>1539160890028</updated> | 434 | <updated>1539160890028</updated> |
| 326 | </task> | 435 | </task> |
| 327 | - <option name="localTasksCounter" value="15" /> | 436 | + <task id="LOCAL-00015" summary="readme"> |
| 437 | + <created>1539161146400</created> | ||
| 438 | + <option name="number" value="00015" /> | ||
| 439 | + <option name="presentableId" value="LOCAL-00015" /> | ||
| 440 | + <option name="project" value="LOCAL" /> | ||
| 441 | + <updated>1539161146400</updated> | ||
| 442 | + </task> | ||
| 443 | + <option name="localTasksCounter" value="16" /> | ||
| 328 | <servers /> | 444 | <servers /> |
| 329 | </component> | 445 | </component> |
| 330 | <component name="ToolWindowManager"> | 446 | <component name="ToolWindowManager"> |
| @@ -337,13 +453,13 @@ | @@ -337,13 +453,13 @@ | ||
| 337 | <window_info anchor="right" id="Capture Analysis" order="4" /> | 453 | <window_info anchor="right" id="Capture Analysis" order="4" /> |
| 338 | <window_info anchor="bottom" id="Event Log" order="8" sideWeight="0.5042644" side_tool="true" weight="0.3297062" /> | 454 | <window_info anchor="bottom" id="Event Log" order="8" sideWeight="0.5042644" side_tool="true" weight="0.3297062" /> |
| 339 | <window_info anchor="bottom" id="Dart Analysis" order="8" weight="0.3297062" /> | 455 | <window_info anchor="bottom" id="Dart Analysis" order="8" weight="0.3297062" /> |
| 340 | - <window_info active="true" anchor="bottom" id="Run" order="2" visible="true" weight="0.3293348" /> | 456 | + <window_info anchor="bottom" id="Run" order="2" visible="true" weight="0.3293348" /> |
| 341 | <window_info anchor="bottom" id="Version Control" order="8" weight="0.32861805" /> | 457 | <window_info anchor="bottom" id="Version Control" order="8" weight="0.32861805" /> |
| 342 | <window_info anchor="bottom" id="Terminal" order="8" sideWeight="0.49573562" weight="0.32824427" /> | 458 | <window_info anchor="bottom" id="Terminal" order="8" sideWeight="0.49573562" weight="0.32824427" /> |
| 343 | <window_info anchor="right" id="Flutter Outline" order="4" /> | 459 | <window_info anchor="right" id="Flutter Outline" order="4" /> |
| 344 | <window_info id="Capture Tool" order="3" /> | 460 | <window_info id="Capture Tool" order="3" /> |
| 345 | <window_info id="Designer" order="3" /> | 461 | <window_info id="Designer" order="3" /> |
| 346 | - <window_info content_ui="combo" id="Project" order="0" visible="true" weight="0.25" /> | 462 | + <window_info active="true" content_ui="combo" id="Project" order="0" visible="true" weight="0.25" /> |
| 347 | <window_info id="Structure" order="1" side_tool="true" weight="0.25" /> | 463 | <window_info id="Structure" order="1" side_tool="true" weight="0.25" /> |
| 348 | <window_info anchor="right" id="Fabric" order="4" /> | 464 | <window_info anchor="right" id="Fabric" order="4" /> |
| 349 | <window_info anchor="right" id="Theme Preview" order="4" /> | 465 | <window_info anchor="right" id="Theme Preview" order="4" /> |
| @@ -387,22 +503,15 @@ | @@ -387,22 +503,15 @@ | ||
| 387 | </breakpoint-manager> | 503 | </breakpoint-manager> |
| 388 | </component> | 504 | </component> |
| 389 | <component name="editorHistoryManager"> | 505 | <component name="editorHistoryManager"> |
| 390 | - <entry file="file://$PROJECT_DIR$/lib/flutter_screenutil.dart"> | ||
| 391 | - <provider selected="true" editor-type-id="text-editor"> | ||
| 392 | - <state relative-caret-position="1890"> | ||
| 393 | - <caret line="70" column="26" selection-start-line="70" selection-start-column="26" selection-end-line="70" selection-end-column="26" /> | ||
| 394 | - </state> | ||
| 395 | - </provider> | ||
| 396 | - </entry> | ||
| 397 | <entry file="file://$PROJECT_DIR$/example/lib/flutter_screenutil.dart" /> | 506 | <entry file="file://$PROJECT_DIR$/example/lib/flutter_screenutil.dart" /> |
| 398 | - <entry file="file://$PROJECT_DIR$/README-EN.md"> | 507 | + <entry file="file://$PROJECT_DIR$/README.md"> |
| 399 | <provider selected="true" editor-type-id="text-editor"> | 508 | <provider selected="true" editor-type-id="text-editor"> |
| 400 | <state relative-caret-position="2457"> | 509 | <state relative-caret-position="2457"> |
| 401 | <caret line="91" column="29" lean-forward="true" selection-start-line="91" selection-start-column="29" selection-end-line="91" selection-end-column="29" /> | 510 | <caret line="91" column="29" lean-forward="true" selection-start-line="91" selection-start-column="29" selection-end-line="91" selection-end-column="29" /> |
| 402 | </state> | 511 | </state> |
| 403 | </provider> | 512 | </provider> |
| 404 | </entry> | 513 | </entry> |
| 405 | - <entry file="file://$PROJECT_DIR$/README.md"> | 514 | + <entry file="file://$PROJECT_DIR$/README_CN.md"> |
| 406 | <provider selected="true" editor-type-id="text-editor"> | 515 | <provider selected="true" editor-type-id="text-editor"> |
| 407 | <state relative-caret-position="3240"> | 516 | <state relative-caret-position="3240"> |
| 408 | <caret line="120" column="6" selection-start-line="120" selection-start-column="6" selection-end-line="120" selection-end-column="6" /> | 517 | <caret line="120" column="6" selection-start-line="120" selection-start-column="6" selection-end-line="120" selection-end-column="6" /> |
| @@ -430,7 +539,7 @@ | @@ -430,7 +539,7 @@ | ||
| 430 | </state> | 539 | </state> |
| 431 | </provider> | 540 | </provider> |
| 432 | </entry> | 541 | </entry> |
| 433 | - <entry file="file://$PROJECT_DIR$/README.md"> | 542 | + <entry file="file://$PROJECT_DIR$/README_CN.md"> |
| 434 | <provider selected="true" editor-type-id="text-editor"> | 543 | <provider selected="true" editor-type-id="text-editor"> |
| 435 | <state relative-caret-position="3240"> | 544 | <state relative-caret-position="3240"> |
| 436 | <caret line="120" column="6" selection-start-line="120" selection-start-column="6" selection-end-line="120" selection-end-column="6" /> | 545 | <caret line="120" column="6" selection-start-line="120" selection-start-column="6" selection-end-line="120" selection-end-column="6" /> |
| @@ -479,7 +588,7 @@ | @@ -479,7 +588,7 @@ | ||
| 479 | </state> | 588 | </state> |
| 480 | </provider> | 589 | </provider> |
| 481 | </entry> | 590 | </entry> |
| 482 | - <entry file="file://$PROJECT_DIR$/README.md"> | 591 | + <entry file="file://$PROJECT_DIR$/README_CN.md"> |
| 483 | <provider selected="true" editor-type-id="text-editor"> | 592 | <provider selected="true" editor-type-id="text-editor"> |
| 484 | <state relative-caret-position="3240"> | 593 | <state relative-caret-position="3240"> |
| 485 | <caret line="120" column="6" lean-forward="true" selection-start-line="120" selection-start-column="6" selection-end-line="120" selection-end-column="6" /> | 594 | <caret line="120" column="6" lean-forward="true" selection-start-line="120" selection-start-column="6" selection-end-line="120" selection-end-column="6" /> |
| @@ -498,7 +607,7 @@ | @@ -498,7 +607,7 @@ | ||
| 498 | </state> | 607 | </state> |
| 499 | </provider> | 608 | </provider> |
| 500 | </entry> | 609 | </entry> |
| 501 | - <entry file="file://$PROJECT_DIR$/README.md"> | 610 | + <entry file="file://$PROJECT_DIR$/README_CN.md"> |
| 502 | <provider selected="true" editor-type-id="text-editor"> | 611 | <provider selected="true" editor-type-id="text-editor"> |
| 503 | <state relative-caret-position="2727"> | 612 | <state relative-caret-position="2727"> |
| 504 | <caret line="101" column="10" selection-start-line="101" selection-start-column="10" selection-end-line="101" selection-end-column="10" /> | 613 | <caret line="101" column="10" selection-start-line="101" selection-start-column="10" selection-end-line="101" selection-end-column="10" /> |
| @@ -531,7 +640,7 @@ | @@ -531,7 +640,7 @@ | ||
| 531 | </state> | 640 | </state> |
| 532 | </provider> | 641 | </provider> |
| 533 | </entry> | 642 | </entry> |
| 534 | - <entry file="file://$PROJECT_DIR$/README.md"> | 643 | + <entry file="file://$PROJECT_DIR$/README_CN.md"> |
| 535 | <provider selected="true" editor-type-id="text-editor"> | 644 | <provider selected="true" editor-type-id="text-editor"> |
| 536 | <state relative-caret-position="2727"> | 645 | <state relative-caret-position="2727"> |
| 537 | <caret line="101" column="10" lean-forward="true" selection-start-line="101" selection-start-column="10" selection-end-line="101" selection-end-column="10" /> | 646 | <caret line="101" column="10" lean-forward="true" selection-start-line="101" selection-start-column="10" selection-end-line="101" selection-end-column="10" /> |
| @@ -557,7 +666,7 @@ | @@ -557,7 +666,7 @@ | ||
| 557 | </state> | 666 | </state> |
| 558 | </provider> | 667 | </provider> |
| 559 | </entry> | 668 | </entry> |
| 560 | - <entry file="file://$PROJECT_DIR$/README.md"> | 669 | + <entry file="file://$PROJECT_DIR$/README_CN.md"> |
| 561 | <provider selected="true" editor-type-id="text-editor"> | 670 | <provider selected="true" editor-type-id="text-editor"> |
| 562 | <state relative-caret-position="2160"> | 671 | <state relative-caret-position="2160"> |
| 563 | <caret line="80" column="16" lean-forward="true" selection-start-line="80" selection-start-column="16" selection-end-line="80" selection-end-column="16" /> | 672 | <caret line="80" column="16" lean-forward="true" selection-start-line="80" selection-start-column="16" selection-end-line="80" selection-end-column="16" /> |
| @@ -682,34 +791,39 @@ | @@ -682,34 +791,39 @@ | ||
| 682 | </state> | 791 | </state> |
| 683 | </provider> | 792 | </provider> |
| 684 | </entry> | 793 | </entry> |
| 685 | - <entry file="file://$PROJECT_DIR$/README.md"> | 794 | + <entry file="file://$PROJECT_DIR$/effect.png"> |
| 795 | + <provider selected="true" editor-type-id="images"> | ||
| 796 | + <state /> | ||
| 797 | + </provider> | ||
| 798 | + </entry> | ||
| 799 | + <entry file="file://$PROJECT_DIR$/example/lib/main.dart"> | ||
| 686 | <provider selected="true" editor-type-id="text-editor"> | 800 | <provider selected="true" editor-type-id="text-editor"> |
| 687 | - <state relative-caret-position="378"> | ||
| 688 | - <caret line="14" column="11" selection-start-line="14" selection-end-line="14" selection-end-column="11" /> | 801 | + <state relative-caret-position="27"> |
| 802 | + <caret line="71" column="18" lean-forward="true" selection-start-line="71" selection-start-column="18" selection-end-line="71" selection-end-column="18" /> | ||
| 803 | + <folding> | ||
| 804 | + <element signature="e#0#39#0" expanded="true" /> | ||
| 805 | + </folding> | ||
| 689 | </state> | 806 | </state> |
| 690 | </provider> | 807 | </provider> |
| 691 | </entry> | 808 | </entry> |
| 692 | - <entry file="file://$PROJECT_DIR$/README-EN.md"> | 809 | + <entry file="file://$PROJECT_DIR$/pubspec.yaml"> |
| 693 | <provider selected="true" editor-type-id="text-editor"> | 810 | <provider selected="true" editor-type-id="text-editor"> |
| 694 | - <state relative-caret-position="243"> | ||
| 695 | - <caret line="21" lean-forward="true" selection-start-line="21" selection-end-line="21" /> | 811 | + <state relative-caret-position="270"> |
| 812 | + <caret line="10" column="10" lean-forward="true" selection-start-line="10" selection-start-column="10" selection-end-line="10" selection-end-column="10" /> | ||
| 696 | </state> | 813 | </state> |
| 697 | </provider> | 814 | </provider> |
| 698 | </entry> | 815 | </entry> |
| 699 | - <entry file="file://$PROJECT_DIR$/pubspec.yaml"> | 816 | + <entry file="file://$PROJECT_DIR$/README.md"> |
| 700 | <provider selected="true" editor-type-id="text-editor"> | 817 | <provider selected="true" editor-type-id="text-editor"> |
| 701 | - <state relative-caret-position="432"> | ||
| 702 | - <caret line="16" selection-start-line="16" selection-end-line="16" /> | 818 | + <state relative-caret-position="108"> |
| 819 | + <caret line="4" column="17" selection-start-line="4" selection-start-column="17" selection-end-line="4" selection-end-column="17" /> | ||
| 703 | </state> | 820 | </state> |
| 704 | </provider> | 821 | </provider> |
| 705 | </entry> | 822 | </entry> |
| 706 | - <entry file="file://$PROJECT_DIR$/example/lib/main.dart"> | 823 | + <entry file="file://$PROJECT_DIR$/README_CN.md"> |
| 707 | <provider selected="true" editor-type-id="text-editor"> | 824 | <provider selected="true" editor-type-id="text-editor"> |
| 708 | - <state relative-caret-position="432"> | ||
| 709 | - <caret line="86" column="12" selection-start-line="86" selection-start-column="12" selection-end-line="86" selection-end-column="12" /> | ||
| 710 | - <folding> | ||
| 711 | - <element signature="e#0#39#0" expanded="true" /> | ||
| 712 | - </folding> | 825 | + <state relative-caret-position="81"> |
| 826 | + <caret line="3" lean-forward="true" selection-start-line="3" selection-end-line="3" /> | ||
| 713 | </state> | 827 | </state> |
| 714 | </provider> | 828 | </provider> |
| 715 | </entry> | 829 | </entry> |
| 1 | 1 | ||
| 2 | # flutter_ScreenUtil | 2 | # flutter_ScreenUtil |
| 3 | -**flutter 屏幕适配方案** | 3 | +**flutter Screen adaptation scheme** |
| 4 | 4 | ||
| 5 | -[README of English](/README-EN.md) | 5 | +[中文文档](/README_CN.md) |
| 6 | 6 | ||
| 7 | github: https://github.com/OpenFlutter/flutter_ScreenUtil </br> | 7 | github: https://github.com/OpenFlutter/flutter_ScreenUtil </br> |
| 8 | csdn博客工具介绍:https://blog.csdn.net/u011272795/article/details/82795477 | 8 | csdn博客工具介绍:https://blog.csdn.net/u011272795/article/details/82795477 |
| 9 | 9 | ||
| 10 | 10 | ||
| 11 | -## 使用方法: | 11 | +## Usege: |
| 12 | 12 | ||
| 13 | -### 安装依赖: | ||
| 14 | - | ||
| 15 | -安装之前请查看最新版本 | 13 | +### Add dependency: |
| 14 | +Please check the latest version before installation. | ||
| 16 | ``` | 15 | ``` |
| 17 | dependencies: | 16 | dependencies: |
| 18 | flutter: | 17 | flutter: |
| 19 | sdk: flutter | 18 | sdk: flutter |
| 20 | - # 添加依赖 | 19 | + # add flutter_ScreenUtil |
| 21 | flutter_screenutil: ^0.2.0 | 20 | flutter_screenutil: ^0.2.0 |
| 22 | ``` | 21 | ``` |
| 23 | 22 | ||
| 24 | -### 在每个使用的地方导入包: | 23 | +### Add the following imports to your Dart code: |
| 25 | ``` | 24 | ``` |
| 26 | import 'package:flutter_screenutil/flutter_screenutil.dart'; | 25 | import 'package:flutter_screenutil/flutter_screenutil.dart'; |
| 27 | - | ||
| 28 | ``` | 26 | ``` |
| 29 | 27 | ||
| 30 | -### 初始化设置尺寸 | ||
| 31 | -在使用之前请设置好设计稿的宽度和高度,传入设计稿的宽度和高度(单位px) | ||
| 32 | -如果不设置则使用默认尺寸,默认为1080*1920 | ||
| 33 | -一定在MaterialApp的home中的页面设置,以保证在每次使用之前设置好了适配尺寸: | 28 | +### Initialize the setup size |
| 29 | +Please set the width and height of the design draft before use, the width and height of the design draft (unit px). | ||
| 30 | +If not set, the default size is used. The default is 1080*1920. | ||
| 31 | +Be sure to set the page in the MaterialApp's home to ensure that the fit size is set before each use: | ||
| 34 | 32 | ||
| 35 | ``` | 33 | ``` |
| 36 | -//设置适配尺寸 (填入设计稿中设备的屏幕尺寸) 假如设计稿是按iPhone6的尺寸设计的(iPhone6 750*1334) | ||
| 37 | - ScreenUtil.instance = ScreenUtil(width: 750, height: 1334)..init(context); | 34 | +//Set the fit size (fill in the screen size of the device in the design) |
| 35 | +//If the design is based on the size of the iPhone6 (iPhone6 750*1334) | ||
| 36 | +ScreenUtil.instance = ScreenUtil(width: 750, height: 1334)..init(context); | ||
| 38 | ``` | 37 | ``` |
| 39 | 38 | ||
| 40 | -### 使用: | 39 | +### Use: |
| 41 | 40 | ||
| 42 | -适配尺寸: | 41 | +Fit size: |
| 43 | ``` | 42 | ``` |
| 44 | -//传入设计稿的px尺寸: | ||
| 45 | -适配后的宽度width: ScreenUtil().setWidth(540), | ||
| 46 | -适配后的高度height: ScreenUtil().setHeight(200), | 43 | +Pass the px size of the design draft: |
| 44 | + | ||
| 45 | +Width after adaptation: ScreenUtil().setWidth(540), | ||
| 46 | +Height after adaptation: ScreenUtil().setHeight(200), | ||
| 47 | 47 | ||
| 48 | -例如: | 48 | +//for example: |
| 49 | Container( | 49 | Container( |
| 50 | width: ScreenUtil().setWidth(375), | 50 | width: ScreenUtil().setWidth(375), |
| 51 | height: ScreenUtil().setHeight(200), | 51 | height: ScreenUtil().setHeight(200), |
| 52 | + ... | ||
| 52 | ), | 53 | ), |
| 53 | ``` | 54 | ``` |
| 54 | 55 | ||
| 55 | -其他相关api: | 56 | +Other related apis: |
| 56 | ``` | 57 | ``` |
| 57 | - ScreenUtil.pixelRatio //设备的像素密度 | ||
| 58 | - ScreenUtil.screenWidth //设备宽度 | ||
| 59 | - ScreenUtil.screenHeight //设备高度 | ||
| 60 | - ScreenUtil.bottomBarHeight //底部安全区距离,适用于全面屏下面有按键的 | ||
| 61 | - ScreenUtil.statusBarHeight //状态栏高度 刘海屏会更高 单位px | 58 | + ScreenUtil.pixelRatio //Device pixel density |
| 59 | + ScreenUtil.screenWidth //Device width | ||
| 60 | + ScreenUtil.screenHeight //Device height | ||
| 61 | + ScreenUtil.bottomBarHeight //Bottom safe zone distance, suitable for buttons with full screen | ||
| 62 | + ScreenUtil.statusBarHeight //Status bar height , Notch will be higher Unit px | ||
| 62 | 63 | ||
| 63 | - ScreenUtil().scaleWidth //宽度相对于设计稿放大的倍数 | ||
| 64 | - ScreenUtil().scaleHeight //高度相对于设计稿放大的倍数 | 64 | + ScreenUtil().scaleWidth //The width is enlarged relative to the design draft |
| 65 | + ScreenUtil().scaleHeight //Height relative to the magnification of the design draft | ||
| 65 | 66 | ||
| 66 | ``` | 67 | ``` |
| 67 | 68 | ||
| 68 | ``` | 69 | ``` |
| 69 | -//导入 | 70 | +//import |
| 70 | import 'package:flutter_screenutil/flutter_screenutil.dart'; | 71 | import 'package:flutter_screenutil/flutter_screenutil.dart'; |
| 71 | 72 | ||
| 72 | ... | 73 | ... |
| 73 | 74 | ||
| 74 | @override | 75 | @override |
| 75 | Widget build(BuildContext context) { | 76 | Widget build(BuildContext context) { |
| 76 | - //设置适配尺寸 (填入设计稿中设备的屏幕尺寸) 假如设计稿是按iPhone6的尺寸设计的(iPhone6 750*1334) | 77 | + //Set the fit size (fill in the screen size of the device in the design) If the design is based on the size of the iPhone6 (iPhone6 750*1334) |
| 77 | ScreenUtil.instance = ScreenUtil(width: 750, height: 1334)..init(context); | 78 | ScreenUtil.instance = ScreenUtil(width: 750, height: 1334)..init(context); |
| 78 | - print('设备宽度:${ScreenUtil.screenWidth}'); //设备宽度 | ||
| 79 | - print('设备高度:${ScreenUtil.screenHeight}'); //设备高度 | ||
| 80 | - print('设备的像素密度:${ScreenUtil.pixelRatio}'); //设备的像素密度 | ||
| 81 | - print('底部安全区距离:${ScreenUtil.bottomBarHeight}'); //底部安全区距离,适用于全面屏下面有按键的 | ||
| 82 | - print('状态栏高度:${ScreenUtil.statusBarHeight}px'); //状态栏高度 刘海屏会更高 | ||
| 83 | - print('宽度相对于设计稿放大的倍数:${ScreenUtil().scaleWidth}'); //宽度相对于设计稿放大的倍数 | ||
| 84 | - print('高度相对于设计稿放大的倍数:${ScreenUtil().scaleHeight}'); //高度相对于设计稿放大的倍数 | 79 | + print('Device width:${ScreenUtil.screenWidth}'); //Device width |
| 80 | + print('Device height:${ScreenUtil.screenHeight}'); //Device height | ||
| 81 | + print('Device pixel density:${ScreenUtil.pixelRatio}'); //Device pixel density | ||
| 82 | + print('Bottom safe zone distance:${ScreenUtil.bottomBarHeight}'); //Bottom safe zone distance,suitable for buttons with full screen | ||
| 83 | + print('Status bar height:${ScreenUtil.statusBarHeight}px'); //Status bar height , Notch will be higher Unit px | ||
| 84 | + print('The width is enlarged relative to the design draft:${ScreenUtil().scaleWidth}'); //The width is enlarged relative to the design draft | ||
| 85 | + print('Height relative to the magnification of the design draft:${ScreenUtil().scaleHeight}'); //Height relative to the magnification of the design draft | ||
| 85 | 86 | ||
| 86 | return new Scaffold( | 87 | return new Scaffold( |
| 87 | appBar: new AppBar( | 88 | appBar: new AppBar( |
| @@ -97,7 +98,7 @@ import 'package:flutter_screenutil/flutter_screenutil.dart'; | @@ -97,7 +98,7 @@ import 'package:flutter_screenutil/flutter_screenutil.dart'; | ||
| 97 | height: ScreenUtil().setHeight(200), | 98 | height: ScreenUtil().setHeight(200), |
| 98 | color: Colors.red, | 99 | color: Colors.red, |
| 99 | child: Text( | 100 | child: Text( |
| 100 | - '我的宽度${ScreenUtil().setWidth(375)}dp', | 101 | + 'My width:${ScreenUtil().setWidth(375)}dp', |
| 101 | style: TextStyle(color: Colors.white), | 102 | style: TextStyle(color: Colors.white), |
| 102 | ), | 103 | ), |
| 103 | ), | 104 | ), |
| @@ -105,18 +106,18 @@ import 'package:flutter_screenutil/flutter_screenutil.dart'; | @@ -105,18 +106,18 @@ import 'package:flutter_screenutil/flutter_screenutil.dart'; | ||
| 105 | width: ScreenUtil().setWidth(375), | 106 | width: ScreenUtil().setWidth(375), |
| 106 | height: ScreenUtil().setHeight(200), | 107 | height: ScreenUtil().setHeight(200), |
| 107 | color: Colors.blue, | 108 | color: Colors.blue, |
| 108 | - child: Text('我的宽度${ScreenUtil().setWidth(375)}dp', | 109 | + child: Text('My width:${ScreenUtil().setWidth(375)}dp', |
| 109 | style: TextStyle(color: Colors.white)), | 110 | style: TextStyle(color: Colors.white)), |
| 110 | ), | 111 | ), |
| 111 | ], | 112 | ], |
| 112 | ), | 113 | ), |
| 113 | - Text('设备的屏幕宽度:${ScreenUtil.screenWidth}px'), | ||
| 114 | - Text('设备的屏幕高度:${ScreenUtil.screenHeight}px'), | ||
| 115 | - Text('设备的像素密度:${ScreenUtil.pixelRatio}'), | ||
| 116 | - Text('底部安全区距离:${ScreenUtil.bottomBarHeight}px'), | ||
| 117 | - Text('状态栏高度:${ScreenUtil.statusBarHeight}px'), | ||
| 118 | - Text('宽度相对于设计稿放大的倍数:${ScreenUtil().scaleWidth}'), | ||
| 119 | - Text('高度相对于设计稿放大的倍数:${ScreenUtil().scaleHeight}'), | 114 | + Text('Device width:${ScreenUtil.screenWidth}px'), |
| 115 | + Text('Device height:${ScreenUtil.screenHeight}px'), | ||
| 116 | + Text('Device pixel density:${ScreenUtil.pixelRatio}'), | ||
| 117 | + Text('Bottom safe zone distance:${ScreenUtil.bottomBarHeight}px'), | ||
| 118 | + Text('Status bar height:${ScreenUtil.statusBarHeight}px'), | ||
| 119 | + Text('The width is enlarged relative to the design draft:${ScreenUtil().scaleWidth}'), | ||
| 120 | + Text('Height relative to the magnification of the design draft:${ScreenUtil().scaleHeight}'), | ||
| 120 | ], | 121 | ], |
| 121 | ), | 122 | ), |
| 122 | ), | 123 | ), |
| @@ -124,11 +125,11 @@ import 'package:flutter_screenutil/flutter_screenutil.dart'; | @@ -124,11 +125,11 @@ import 'package:flutter_screenutil/flutter_screenutil.dart'; | ||
| 124 | } | 125 | } |
| 125 | ``` | 126 | ``` |
| 126 | 127 | ||
| 127 | -### 使用示例: | 128 | +### example: |
| 128 | 129 | ||
| 129 | [example demo](/example) | 130 | [example demo](/example) |
| 130 | 131 | ||
| 131 | -效果: | 132 | +effect: |
| 132 | 133 | ||
| 133 | - | 134 | + |
| 134 | 135 |
| 1 | 1 | ||
| 2 | # flutter_ScreenUtil | 2 | # flutter_ScreenUtil |
| 3 | -**flutter Screen adaptation scheme** | 3 | +**flutter 屏幕适配方案** |
| 4 | 4 | ||
| 5 | -[中文文档](/README.md) | 5 | +[README of English](/README.md) |
| 6 | 6 | ||
| 7 | github: https://github.com/OpenFlutter/flutter_ScreenUtil </br> | 7 | github: https://github.com/OpenFlutter/flutter_ScreenUtil </br> |
| 8 | csdn博客工具介绍:https://blog.csdn.net/u011272795/article/details/82795477 | 8 | csdn博客工具介绍:https://blog.csdn.net/u011272795/article/details/82795477 |
| 9 | 9 | ||
| 10 | 10 | ||
| 11 | -## Usege: | 11 | +## 使用方法: |
| 12 | 12 | ||
| 13 | -### Add dependency: | ||
| 14 | -Please check the latest version before installation. | 13 | +### 安装依赖: |
| 14 | + | ||
| 15 | +安装之前请查看最新版本 | ||
| 15 | ``` | 16 | ``` |
| 16 | dependencies: | 17 | dependencies: |
| 17 | flutter: | 18 | flutter: |
| 18 | sdk: flutter | 19 | sdk: flutter |
| 19 | - # add flutter_ScreenUtil | 20 | + # 添加依赖 |
| 20 | flutter_screenutil: ^0.2.0 | 21 | flutter_screenutil: ^0.2.0 |
| 21 | ``` | 22 | ``` |
| 22 | 23 | ||
| 23 | -### Add the following imports to your Dart code: | 24 | +### 在每个使用的地方导入包: |
| 24 | ``` | 25 | ``` |
| 25 | import 'package:flutter_screenutil/flutter_screenutil.dart'; | 26 | import 'package:flutter_screenutil/flutter_screenutil.dart'; |
| 27 | + | ||
| 26 | ``` | 28 | ``` |
| 27 | 29 | ||
| 28 | -### Initialize the setup size | ||
| 29 | -Please set the width and height of the design draft before use, the width and height of the design draft (unit px). | ||
| 30 | -If not set, the default size is used. The default is 1080*1920. | ||
| 31 | -Be sure to set the page in the MaterialApp's home to ensure that the fit size is set before each use: | 30 | +### 初始化设置尺寸 |
| 31 | +在使用之前请设置好设计稿的宽度和高度,传入设计稿的宽度和高度(单位px) | ||
| 32 | +如果不设置则使用默认尺寸,默认为1080*1920 | ||
| 33 | +一定在MaterialApp的home中的页面设置,以保证在每次使用之前设置好了适配尺寸: | ||
| 32 | 34 | ||
| 33 | ``` | 35 | ``` |
| 34 | -//Set the fit size (fill in the screen size of the device in the design) | ||
| 35 | -//If the design is based on the size of the iPhone6 (iPhone6 750*1334) | ||
| 36 | -ScreenUtil.instance = ScreenUtil(width: 750, height: 1334)..init(context); | 36 | +//设置适配尺寸 (填入设计稿中设备的屏幕尺寸) 假如设计稿是按iPhone6的尺寸设计的(iPhone6 750*1334) |
| 37 | + ScreenUtil.instance = ScreenUtil(width: 750, height: 1334)..init(context); | ||
| 37 | ``` | 38 | ``` |
| 38 | 39 | ||
| 39 | -### Use: | 40 | +### 使用: |
| 40 | 41 | ||
| 41 | -Fit size: | 42 | +适配尺寸: |
| 42 | ``` | 43 | ``` |
| 43 | -Pass the px size of the design draft: | ||
| 44 | - | ||
| 45 | -Width after adaptation: ScreenUtil().setWidth(540), | ||
| 46 | -Height after adaptation: ScreenUtil().setHeight(200), | 44 | +//传入设计稿的px尺寸: |
| 45 | +适配后的宽度width: ScreenUtil().setWidth(540), | ||
| 46 | +适配后的高度height: ScreenUtil().setHeight(200), | ||
| 47 | 47 | ||
| 48 | -//for example: | 48 | +例如: |
| 49 | Container( | 49 | Container( |
| 50 | width: ScreenUtil().setWidth(375), | 50 | width: ScreenUtil().setWidth(375), |
| 51 | height: ScreenUtil().setHeight(200), | 51 | height: ScreenUtil().setHeight(200), |
| 52 | - ... | ||
| 53 | ), | 52 | ), |
| 54 | ``` | 53 | ``` |
| 55 | 54 | ||
| 56 | -Other related apis: | 55 | +其他相关api: |
| 57 | ``` | 56 | ``` |
| 58 | - ScreenUtil.pixelRatio //Device pixel density | ||
| 59 | - ScreenUtil.screenWidth //Device width | ||
| 60 | - ScreenUtil.screenHeight //Device height | ||
| 61 | - ScreenUtil.bottomBarHeight //Bottom safe zone distance, suitable for buttons with full screen | ||
| 62 | - ScreenUtil.statusBarHeight //Status bar height , Notch will be higher Unit px | 57 | + ScreenUtil.pixelRatio //设备的像素密度 |
| 58 | + ScreenUtil.screenWidth //设备宽度 | ||
| 59 | + ScreenUtil.screenHeight //设备高度 | ||
| 60 | + ScreenUtil.bottomBarHeight //底部安全区距离,适用于全面屏下面有按键的 | ||
| 61 | + ScreenUtil.statusBarHeight //状态栏高度 刘海屏会更高 单位px | ||
| 63 | 62 | ||
| 64 | - ScreenUtil().scaleWidth //The width is enlarged relative to the design draft | ||
| 65 | - ScreenUtil().scaleHeight //Height relative to the magnification of the design draft | 63 | + ScreenUtil().scaleWidth //宽度相对于设计稿放大的倍数 |
| 64 | + ScreenUtil().scaleHeight //高度相对于设计稿放大的倍数 | ||
| 66 | 65 | ||
| 67 | ``` | 66 | ``` |
| 68 | 67 | ||
| 69 | ``` | 68 | ``` |
| 70 | -//import | 69 | +//导入 |
| 71 | import 'package:flutter_screenutil/flutter_screenutil.dart'; | 70 | import 'package:flutter_screenutil/flutter_screenutil.dart'; |
| 72 | 71 | ||
| 73 | ... | 72 | ... |
| 74 | 73 | ||
| 75 | @override | 74 | @override |
| 76 | Widget build(BuildContext context) { | 75 | Widget build(BuildContext context) { |
| 77 | - //Set the fit size (fill in the screen size of the device in the design) If the design is based on the size of the iPhone6 (iPhone6 750*1334) | 76 | + //设置适配尺寸 (填入设计稿中设备的屏幕尺寸) 假如设计稿是按iPhone6的尺寸设计的(iPhone6 750*1334) |
| 78 | ScreenUtil.instance = ScreenUtil(width: 750, height: 1334)..init(context); | 77 | ScreenUtil.instance = ScreenUtil(width: 750, height: 1334)..init(context); |
| 79 | - print('Device width:${ScreenUtil.screenWidth}'); //Device width | ||
| 80 | - print('Device height:${ScreenUtil.screenHeight}'); //Device height | ||
| 81 | - print('Device pixel density:${ScreenUtil.pixelRatio}'); //Device pixel density | ||
| 82 | - print('Bottom safe zone distance:${ScreenUtil.bottomBarHeight}'); //Bottom safe zone distance,suitable for buttons with full screen | ||
| 83 | - print('Status bar height:${ScreenUtil.statusBarHeight}px'); //Status bar height , Notch will be higher Unit px | ||
| 84 | - print('The width is enlarged relative to the design draft:${ScreenUtil().scaleWidth}'); //The width is enlarged relative to the design draft | ||
| 85 | - print('Height relative to the magnification of the design draft:${ScreenUtil().scaleHeight}'); //Height relative to the magnification of the design draft | 78 | + print('设备宽度:${ScreenUtil.screenWidth}'); //设备宽度 |
| 79 | + print('设备高度:${ScreenUtil.screenHeight}'); //设备高度 | ||
| 80 | + print('设备的像素密度:${ScreenUtil.pixelRatio}'); //设备的像素密度 | ||
| 81 | + print('底部安全区距离:${ScreenUtil.bottomBarHeight}'); //底部安全区距离,适用于全面屏下面有按键的 | ||
| 82 | + print('状态栏高度:${ScreenUtil.statusBarHeight}px'); //状态栏高度 刘海屏会更高 | ||
| 83 | + print('宽度相对于设计稿放大的倍数:${ScreenUtil().scaleWidth}'); //宽度相对于设计稿放大的倍数 | ||
| 84 | + print('高度相对于设计稿放大的倍数:${ScreenUtil().scaleHeight}'); //高度相对于设计稿放大的倍数 | ||
| 86 | 85 | ||
| 87 | return new Scaffold( | 86 | return new Scaffold( |
| 88 | appBar: new AppBar( | 87 | appBar: new AppBar( |
| @@ -98,7 +97,7 @@ import 'package:flutter_screenutil/flutter_screenutil.dart'; | @@ -98,7 +97,7 @@ import 'package:flutter_screenutil/flutter_screenutil.dart'; | ||
| 98 | height: ScreenUtil().setHeight(200), | 97 | height: ScreenUtil().setHeight(200), |
| 99 | color: Colors.red, | 98 | color: Colors.red, |
| 100 | child: Text( | 99 | child: Text( |
| 101 | - 'My width:${ScreenUtil().setWidth(375)}dp', | 100 | + '我的宽度${ScreenUtil().setWidth(375)}dp', |
| 102 | style: TextStyle(color: Colors.white), | 101 | style: TextStyle(color: Colors.white), |
| 103 | ), | 102 | ), |
| 104 | ), | 103 | ), |
| @@ -106,18 +105,18 @@ import 'package:flutter_screenutil/flutter_screenutil.dart'; | @@ -106,18 +105,18 @@ import 'package:flutter_screenutil/flutter_screenutil.dart'; | ||
| 106 | width: ScreenUtil().setWidth(375), | 105 | width: ScreenUtil().setWidth(375), |
| 107 | height: ScreenUtil().setHeight(200), | 106 | height: ScreenUtil().setHeight(200), |
| 108 | color: Colors.blue, | 107 | color: Colors.blue, |
| 109 | - child: Text('My width:${ScreenUtil().setWidth(375)}dp', | 108 | + child: Text('我的宽度${ScreenUtil().setWidth(375)}dp', |
| 110 | style: TextStyle(color: Colors.white)), | 109 | style: TextStyle(color: Colors.white)), |
| 111 | ), | 110 | ), |
| 112 | ], | 111 | ], |
| 113 | ), | 112 | ), |
| 114 | - Text('Device width:${ScreenUtil.screenWidth}px'), | ||
| 115 | - Text('Device height:${ScreenUtil.screenHeight}px'), | ||
| 116 | - Text('Device pixel density:${ScreenUtil.pixelRatio}'), | ||
| 117 | - Text('Bottom safe zone distance:${ScreenUtil.bottomBarHeight}px'), | ||
| 118 | - Text('Status bar height:${ScreenUtil.statusBarHeight}px'), | ||
| 119 | - Text('The width is enlarged relative to the design draft:${ScreenUtil().scaleWidth}'), | ||
| 120 | - Text('Height relative to the magnification of the design draft:${ScreenUtil().scaleHeight}'), | 113 | + Text('设备的屏幕宽度:${ScreenUtil.screenWidth}px'), |
| 114 | + Text('设备的屏幕高度:${ScreenUtil.screenHeight}px'), | ||
| 115 | + Text('设备的像素密度:${ScreenUtil.pixelRatio}'), | ||
| 116 | + Text('底部安全区距离:${ScreenUtil.bottomBarHeight}px'), | ||
| 117 | + Text('状态栏高度:${ScreenUtil.statusBarHeight}px'), | ||
| 118 | + Text('宽度相对于设计稿放大的倍数:${ScreenUtil().scaleWidth}'), | ||
| 119 | + Text('高度相对于设计稿放大的倍数:${ScreenUtil().scaleHeight}'), | ||
| 121 | ], | 120 | ], |
| 122 | ), | 121 | ), |
| 123 | ), | 122 | ), |
| @@ -125,11 +124,11 @@ import 'package:flutter_screenutil/flutter_screenutil.dart'; | @@ -125,11 +124,11 @@ import 'package:flutter_screenutil/flutter_screenutil.dart'; | ||
| 125 | } | 124 | } |
| 126 | ``` | 125 | ``` |
| 127 | 126 | ||
| 128 | -### example: | 127 | +### 使用示例: |
| 129 | 128 | ||
| 130 | [example demo](/example) | 129 | [example demo](/example) |
| 131 | 130 | ||
| 132 | -effect: | 131 | +效果: |
| 133 | 132 | ||
| 134 | - | 133 | + |
| 135 | 134 |
-
Please register or login to post a comment