Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/dev' into dev
Browse files Browse the repository at this point in the history
# Conflicts:
#	lib/controller/index.dart
#	lib/main.dart
#	lib/page/home.dart
#	readme.md
  • Loading branch information
ckken committed Aug 29, 2019
2 parents 3bf97d3 + 42d1024 commit ee048c6
Show file tree
Hide file tree
Showing 7 changed files with 87 additions and 7 deletions.
2 changes: 1 addition & 1 deletion lib/components/widget_comp.dart
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class IndexState extends State<Index> {
backgroundImage: NetworkImage(
info.avatarUrl,
),
radius: 35,
radius: 30,
),
title: Text(
info.name,
Expand Down
83 changes: 81 additions & 2 deletions lib/page/app_login/index.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import 'package:flutter/material.dart';
import 'dart:math' as math;
import 'package:efox_flutter/lang/index.dart' show AppLocalizations;
import 'package:efox_flutter/store/index.dart' show Store, UserModel;
import './text.dart' as Content;

class Index extends StatefulWidget {
Index({Key key}) : super(key: key);
Expand All @@ -23,9 +24,87 @@ class _IndexState extends State<Index> {
*/
renderOverlay(String text) {
_overlayEntry?.remove();
Size _size = MediaQuery.of(context).size;
_overlayState = Overlay.of(context);
_overlayEntry = OverlayEntry(builder: (context) {
return Center(child: Text(text));
return Scaffold(
backgroundColor: Colors.transparent,
body: GestureDetector(
child: Stack(
children: <Widget>[
Opacity(
opacity: 0.75,
child: Container(
decoration: BoxDecoration(
color: Colors.black,
),
),
),
SizedBox.expand(
child: Center(
child: SizedBox(
height: _size.height / 1.3,
width: _size.width / 1.3,
child: Container(
padding: EdgeInsets.all(20),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(20),
boxShadow: [
BoxShadow(
color: Colors.grey,
blurRadius: 2,
// offset: Offset(0, 1),
),
],
),
child: Column(
children: <Widget>[
Text(
"说明",
style: TextStyle(
color: Colors.black,
fontSize: 22,
),
),
SizedBox(
height: 10,
),
Expanded(
child: SingleChildScrollView(
child: Text(
text,
textAlign: TextAlign.left,
style: TextStyle(
color: Colors.black,
fontSize: 16,
),
),
),
),
FlatButton(
textColor: Theme.of(context).primaryColor,
onPressed: () {
beforeDispose();
},
child: Padding(
padding: EdgeInsets.all(10),
child: Text("确定"),
),
),
],
),
),
),
),
),
],
),
onTap: () {
beforeDispose();
},
),
);
});
_overlayState.insert(_overlayEntry);
}
Expand Down Expand Up @@ -165,7 +244,7 @@ class _IndexState extends State<Index> {
),
),
onTap: () {
renderOverlay(" Text 1");
renderOverlay(Content.loginText);
},
),
SizedBox(
Expand Down
1 change: 1 addition & 0 deletions lib/page/app_login/text.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
const loginText = 'a1sd56a1sd56as1d';
2 changes: 1 addition & 1 deletion lib/page/mine/index.dart
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ class _IndexState extends State<Index> {
),
ListTile(
onTap: () {
Store.value<ConfigModel>(context).$setIsPro();
Store.value<ConfigModel>(context).setIsPro();
},
leading: Icon(Icons.verified_user),
title: Text(Store.value<ConfigModel>(context).isPro
Expand Down
2 changes: 1 addition & 1 deletion lib/store/models/config_state_model.dart
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class ConfigModel extends ConfigInfo with ChangeNotifier {
notifyListeners();
}

Future $setIsPro() async {
Future setIsPro() async {
isPro = !isPro;
notifyListeners();
}
Expand Down
2 changes: 1 addition & 1 deletion lib/widget/scrollview/nestedscrollview/index.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import 'demo.dart' as Demo;
class Index extends StatefulWidget {
static String title = 'NestedScrollView';
static String mdUrl = 'docs/widget/scrollview/nestedscrollview/index.md';
static String originCodeUrl = 'https://docs.flutter.io/flutter/widgets/Scrollbar-class.html';
static String originCodeUrl = 'https://docs.flutter.io/flutter/material/Scrollbar-class.html';

@override
_IndexState createState() => new _IndexState();
Expand Down
2 changes: 1 addition & 1 deletion lib/widget/scrollview/scrollbar/index.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import 'demo.dart' as Demo;
class Index extends StatefulWidget {
static String title = 'Scrollbar';
static String mdUrl = 'docs/widget/scrollview/scrollbar/index.md';
static String originCodeUrl = 'https://docs.flutter.io/flutter/widgets/Scrollbar-class.html';
static String originCodeUrl = 'https://docs.flutter.io/flutter/material/Scrollbar-class.html';

@override
_IndexState createState() => new _IndexState();
Expand Down

0 comments on commit ee048c6

Please sign in to comment.