- Add the repo as a git submodule
git submodule add <url>- Initialize and update the submodule to the latest changes
git submodule init
git submodule update| import 'package:flutter/material.dart'; | |
| void main() => runApp(MyApp()); | |
| class MyApp extends StatelessWidget { | |
| @override | |
| Widget build(BuildContext context) { | |
| return MaterialApp( | |
| title: 'Flutter Demo', | |
| debugShowCheckedModeBanner: false, |
| import 'package:flutter/material.dart'; | |
| void main() => runApp(MyApp()); | |
| class BaseScreen1 extends StatelessWidget { | |
| final LayoutWidgetBuilder builder; | |
| const BaseScreen1({this.builder}); | |
| @override | |
| Widget build(BuildContext context) { |
| import 'dart:ui'; | |
| import 'package:flutter/material.dart'; | |
| import 'package:flutter/cupertino.dart'; | |
| import 'package:flutter/rendering.dart'; | |
| import 'package:flutter/services.dart'; | |
| void main() => runApp(MyApp()); | |
| /// Inspiration taken from [modal_bottom_sheet](https://github.com/jamesblasco/modal_bottom_sheet) |
| mixin IModel { | |
| int get field1; | |
| } | |
| mixin IWidget<Model extends IModel> { | |
| /// | |
| Model get model; | |
| } | |
| mixin IState<W extends IWidget<M>, M extends IModel> { |
| class BuiltRef<T> { | |
| /// Holds the ref, can also be null | |
| final T value; | |
| /// Whether this was constructed using [BuiltRef.undefined] | |
| final bool isUndefined; | |
| /// Create a new reference to [value] | |
| const BuiltRef(this.value) : isUndefined = false; |
git submodule add <url>git submodule init
git submodule updategit remote add upstream <URL>git fetch upstream