Skip to content

Commit 65cede2

Browse files
committed
update readme
1 parent f6ae542 commit 65cede2

File tree

2 files changed

+20
-13
lines changed

2 files changed

+20
-13
lines changed

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ The following functions are supported:
1717
11. baselineToBaseline
1818
2. margin and goneMargin
1919
3. clickPadding (quickly expand the click area of child elements without changing their actual size.
20-
This means that the click area can be shared between child elements without increasing nesting.)
20+
This means that the click area can be shared between child elements without increasing nesting.
21+
Sometimes it may be necessary to combine with z-index)
2122
4. visibility control
2223
5. constraint integrity hint
2324
6. bias

README.md

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ flexibility, and a very flat code hierarchy than Flex and Stack. Say no to 'nest
88

99
**It is recommended to use ConstraintLayout at the top level. For extremely complex layout(One
1010
thousand child elements, two thousand constraints), layout and drawing total time within 5
11-
millisecondsdebug mode on Windows 10,release mode take less time, the frame rate can be easily
11+
milliseconds(debug mode on Windows 10,release mode take less time), the frame rate can be easily
1212
reached 200 fps.**
1313

1414
**If not necessary, try to be relative to the parent layout, so that you can define less id.**
@@ -23,7 +23,8 @@ handle things that were previously (Android ConstraintLayout) two-way constraint
2323
When the layout is complex, if the child elements need to be repainted frequently, it is recommended
2424
to use RepaintBoundary to improve performance.
2525

26-
Anyone who sends you a harassing message, you can send him Flutter code and use nested hell to insult him.
26+
Anyone who sends you a harassing message, you can send him Flutter code and use nested hell to
27+
insult him.
2728

2829
# Feature
2930

@@ -41,7 +42,8 @@ Anyone who sends you a harassing message, you can send him Flutter code and use
4142
11. baselineToBaseline
4243
2. margin and goneMargin
4344
3. clickPadding (quickly expand the click area of child elements without changing their actual size.
44-
This means that the click area can be shared between child elements without increasing nesting. Sometimes it may be necessary to combine with z-index)
45+
This means that the click area can be shared between child elements without increasing nesting.
46+
Sometimes it may be necessary to combine with z-index)
4547
4. visibility control
4648
5. constraint integrity hint
4749
6. bias
@@ -80,11 +82,20 @@ dependencies:
8082
ref: 'v0.8.6-stable'
8183
```
8284
85+
```yaml
86+
dependencies:
87+
flutter_constraintlayout: ^0.8.6-stable
88+
```
89+
90+
```dart
91+
import 'package:flutter_constraintlayout/flutter_constraintlayout.dart';
92+
```
93+
8394
# Example
8495

8596
```dart
8697
import 'package:flutter/material.dart';
87-
import 'package:flutter_constraintlayout/src/constraint_layout/constraint_layout.dart';
98+
import 'package:flutter_constraintlayout/flutter_constraintlayout.dart';
8899
89100
class Example extends StatefulWidget {
90101
const Example({Key? key}) : super(key: key);
@@ -307,7 +318,7 @@ class ExampleState extends State<Example> {
307318

308319
```dart
309320
import 'package:flutter/material.dart';
310-
import 'package:flutter_constraintlayout/src/constraint_layout/constraint_layout.dart';
321+
import 'package:flutter_constraintlayout/flutter_constraintlayout.dart';
311322
312323
class GuidelineExample extends StatelessWidget {
313324
const GuidelineExample({Key? key}) : super(key: key);
@@ -366,7 +377,7 @@ class GuidelineExample extends StatelessWidget {
366377

367378
```dart
368379
import 'package:flutter/material.dart';
369-
import 'package:flutter_constraintlayout/src/constraint_layout/constraint_layout.dart';
380+
import 'package:flutter_constraintlayout/flutter_constraintlayout.dart';
370381
371382
class BarrierExample extends StatelessWidget {
372383
const BarrierExample({Key? key}) : super(key: key);
@@ -434,7 +445,7 @@ class BarrierExample extends StatelessWidget {
434445

435446
```dart
436447
import 'package:flutter/material.dart';
437-
import 'package:flutter_constraintlayout/src/constraint_layout/constraint_layout.dart';
448+
import 'package:flutter_constraintlayout/flutter_constraintlayout.dart';
438449
439450
class BadgeExample extends StatelessWidget {
440451
const BadgeExample({Key? key}) : super(key: key);
@@ -484,17 +495,12 @@ class BadgeExample extends StatelessWidget {
484495
# Support me
485496

486497
If it helps you a lot, consider sponsoring me a cup of milk tea.
487-
<br/>
488498
[Paypal](https://www.paypal.com/paypalme/hackware1993)
489-
<br/>
490-
<br/>
491499
![support.webp](https://github.com/hackware1993/flutter-constraintlayout/blob/master/support.webp?raw=true)
492500

493501
# Contact
494502

495503
496-
<br/>
497-
<br/>
498504
![communication.webp](https://github.com/hackware1993/flutter-constraintlayout/blob/master/communication.webp?raw=true)
499505

500506
# License

0 commit comments

Comments
 (0)