flutter/examples/flutter_gallery/lib/demo/shrine/home.dart
Ian Hickson a78fb87dfe
Relicense Shrine demo to match rest of repository (#45718)
* Relicense Shrine demo to match rest of repository

The Shrine demo was Apache-licensed. The code was mostly
Google-written, with contributions from:

 - Michelle Dudley (@michdud)

 - Abhijeeth Padarthi <rkinabhi@gmail.com> (@rkinabhi)

 - @a14n

I contacted all three, and they confirmed their approval for this
change, as described below.

Abhijeeth Padarthi said by e-mail on Thu, Nov 21, 2019 at 5:48 PM:

> hi Ian,
>
> sure :)
>
> let me know if I need to do anything on my end..

Michelle Dudley wrote by e-mail on Sun, Nov 24, 2019 at 2:07 PM:

> Hi Ian,
>
> That would be ok with me.
>
> Thanks,
>
> Michelle

@a14n said on Discord's Flutter server in the #hackers channel at 10:44PM on Thursday, November 21, 2019:

> @Hixie no problem I agree with this relicensing

* Remove shrine loophole from license checker.
2019-11-27 16:25:56 -08:00

48 lines
1.4 KiB
Dart

// Copyright 2014 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'package:flutter/material.dart';
import 'package:scoped_model/scoped_model.dart';
import 'package:flutter_gallery/demo/shrine/backdrop.dart';
import 'package:flutter_gallery/demo/shrine/expanding_bottom_sheet.dart';
import 'package:flutter_gallery/demo/shrine/model/app_state_model.dart';
import 'package:flutter_gallery/demo/shrine/model/product.dart';
import 'package:flutter_gallery/demo/shrine/supplemental/asymmetric_view.dart';
class ProductPage extends StatelessWidget {
const ProductPage({this.category = Category.all});
final Category category;
@override
Widget build(BuildContext context) {
return ScopedModelDescendant<AppStateModel>(
builder: (BuildContext context, Widget child, AppStateModel model) {
return AsymmetricView(products: model.getProducts());
});
}
}
class HomePage extends StatelessWidget {
const HomePage({
this.expandingBottomSheet,
this.backdrop,
Key key,
}) : super(key: key);
final ExpandingBottomSheet expandingBottomSheet;
final Backdrop backdrop;
@override
Widget build(BuildContext context) {
return Stack(
children: <Widget>[
backdrop,
Align(child: expandingBottomSheet, alignment: Alignment.bottomRight),
],
);
}
}