Getting Started
Installation
SDK requirements and the three dependencies the tutorial uses.
Requirements
| Item | Constraint |
|---|---|
| Flutter | >=3.47.0 |
| Dart SDK | ^3.13.0 |
| Pulled in by the package |
signals_flutter: ^7.1.0
,
material_ui: ^1.6.0
|
Add the dependencies
Create an app (or use an existing one) and add the package. The tutorial code also imports material_ui
(Material widgets, as in the package example) and signals_flutter (for a little app state later), so add them directly too:
flutter create shop
cd shop
flutter pub add xue_hua_adaptive_sliding_layout material_ui signals_flutter
Your pubspec.yaml now contains:
dependencies:
flutter:
sdk: flutter
xue_hua_adaptive_sliding_layout: ^3.4.3
material_ui: ^1.6.0
signals_flutter: ^7.1.0
Imports
Every tutorial file starts with these two imports:
import 'package:material_ui/material_ui.dart';
import 'package:xue_hua_adaptive_sliding_layout/xue_hua_adaptive_sliding_layout.dart';
Next: Your first app.