Skip to content

Commit e6348c4

Browse files
committed
complete first version
0 parents  commit e6348c4

25 files changed

+1539
-0
lines changed

.gitignore

+70
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
# Miscellaneous
2+
*.class
3+
*.log
4+
*.pyc
5+
*.swp
6+
.DS_Store
7+
.atom/
8+
.buildlog/
9+
.history
10+
.svn/
11+
12+
# IntelliJ related
13+
*.iml
14+
*.ipr
15+
*.iws
16+
.idea/
17+
18+
# Visual Studio Code related
19+
.vscode/
20+
21+
# Flutter/Dart/Pub related
22+
**/doc/api/
23+
.dart_tool/
24+
.flutter-plugins
25+
.packages
26+
.pub-cache/
27+
.pub/
28+
/build/
29+
30+
# Android related
31+
**/android/**/gradle-wrapper.jar
32+
**/android/.gradle
33+
**/android/captures/
34+
**/android/gradlew
35+
**/android/gradlew.bat
36+
**/android/local.properties
37+
**/android/**/GeneratedPluginRegistrant.java
38+
39+
# iOS/XCode related
40+
**/ios/**/*.mode1v3
41+
**/ios/**/*.mode2v3
42+
**/ios/**/*.moved-aside
43+
**/ios/**/*.pbxuser
44+
**/ios/**/*.perspectivev3
45+
**/ios/**/*sync/
46+
**/ios/**/.sconsign.dblite
47+
**/ios/**/.tags*
48+
**/ios/**/.vagrant/
49+
**/ios/**/DerivedData/
50+
**/ios/**/Icon?
51+
**/ios/**/Pods/
52+
**/ios/**/.symlinks/
53+
**/ios/**/profile
54+
**/ios/**/xcuserdata
55+
**/ios/.generated/
56+
**/ios/Flutter/App.framework
57+
**/ios/Flutter/Flutter.framework
58+
**/ios/Flutter/Generated.xcconfig
59+
**/ios/Flutter/app.flx
60+
**/ios/Flutter/app.zip
61+
**/ios/Flutter/flutter_assets/
62+
**/ios/ServiceDefinitions.json
63+
**/ios/Runner/GeneratedPluginRegistrant.*
64+
65+
# Exceptions to above rules.
66+
!**/ios/**/default.mode1v3
67+
!**/ios/**/default.mode2v3
68+
!**/ios/**/default.pbxuser
69+
!**/ios/**/default.perspectivev3
70+
!/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages

LICENSE.txt

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
Copyright (c) 2019 ditclear
2+
3+
Permission is hereby granted, free of charge, to any person obtaining a copy
4+
of this software and associated documentation files (the "Software"), to deal
5+
in the Software without restriction, including without limitation the rights
6+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7+
copies of the Software, and to permit persons to whom the Software is
8+
furnished to do so, subject to the following conditions:
9+
10+
The above copyright notice and this permission notice shall be included in
11+
all copies or substantial portions of the Software.
12+
13+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19+
THE SOFTWARE.

README.md

+70
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
# flutter_web_challenge_profile
2+
3+
Use Flutter_web💪 to implement the UI challenge of Google Maps on [uplabs](https://www.uplabs.com/posts/google-maps-redesign-919dd0d6-0883-4378-b5b2-f77e36adb6b5) .
4+
5+
[中文版本](README_CN.md)
6+
7+
> Designer : [cassian.design](https://www.uplabs.com/cassian)
8+
>
9+
> Uplabs : <https://www.uplabs.com/posts/portfolio-8295c52a-fd19-4849-b3c6-deff4fa2c669>
10+
>
11+
> Developer : [ditclear](https://github.com/ditclear)
12+
13+
### Run
14+
15+
First, make sure the relevant environment is installed, please refer to [Flutter-web](https://github.com/flutter/flutter_web).
16+
17+
Then clone
18+
19+
> git clone https://github.com/flutter-ui-challenges/flutter_web_challenge_googlemaps.git
20+
21+
You can open the project with Android Studio, IntelliJ or Visual Studio Code and run the `main.dart` file.
22+
23+
### Challenge
24+
25+
26+
27+
![](ui/preview.png)
28+
29+
![](ui/attachment.png)
30+
31+
32+
33+
34+
35+
36+
37+
#### 不用客气,buy Me a Lunch ~
38+
39+
| Alipay | WeChatPay |
40+
| :----------------------------------------------------------: | :----------------------------------------------------------: |
41+
| ![](https://camo.githubusercontent.com/fbaa3ecc28af039c8e6011ddf473e51d2a08c8d2/68747470733a2f2f75706c6f61642d696d616765732e6a69616e7368752e696f2f75706c6f61645f696d616765732f333732323639352d666664653137306665633933316561652e706e673f696d6167654d6f6772322f6175746f2d6f7269656e742f7374726970253743696d61676556696577322f322f772f333430) | ![](https://camo.githubusercontent.com/ade43488617a69c72d5be1841fd4d0934689a3b0/68747470733a2f2f75706c6f61642d696d616765732e6a69616e7368752e696f2f75706c6f61645f696d616765732f333732323639352d316238323761353465633237346535392e706e673f696d6167654d6f6772322f6175746f2d6f7269656e742f7374726970253743696d61676556696577322f322f772f333430) |
42+
43+
### License
44+
45+
```
46+
Copyright 2019 ditclear
47+
48+
Licensed under the Apache License, Version 2.0 (the "License");
49+
you may not use this file except in compliance with the License.
50+
You may obtain a copy of the License at
51+
52+
http://www.apache.org/licenses/LICENSE-2.0
53+
54+
Unless required by applicable law or agreed to in writing, software
55+
distributed under the License is distributed on an "AS IS" BASIS,
56+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
57+
See the License for the specific language governing permissions and
58+
limitations under the License.
59+
```
60+
61+
62+
63+
64+
65+
66+
67+
68+
69+
70+

README_CN.md

+64
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
# flutter_web_challenge_profile
2+
3+
使用Flutter_web实现[uplabs](https://www.uplabs.com/posts/google-maps-redesign-919dd0d6-0883-4378-b5b2-f77e36adb6b5)上Google Maps的UI挑战
4+
5+
> 设计师 : [cassian.design](https://www.uplabs.com/cassian)
6+
>
7+
> Uplabs : <https://www.uplabs.com/posts/portfolio-8295c52a-fd19-4849-b3c6-deff4fa2c669>
8+
>
9+
> 开发者 : [ditclear](https://github.com/ditclear)
10+
11+
#### 体验一下
12+
13+
首先,确保安装了相关的环境,请参考[Flutter-web](https://github.com/flutter/flutter_web).
14+
15+
然后克隆
16+
17+
> git clone https://github.com/flutter-ui-challenges/flutter_web_challenge_googlemaps.git
18+
19+
你可以使用Android Studio 、IntelliJ或者Visual Studio Code打开项目,然后运行`main.dart`文件
20+
21+
#### 效果图
22+
23+
![](ui/preview.png)
24+
25+
![](ui/attachment.png)
26+
27+
28+
29+
30+
31+
#### 不用客气,buy Me a Lunch ~
32+
33+
| Alipay | WeChatPay |
34+
| :----------------------------------------------------------: | :----------------------------------------------------------: |
35+
| ![](https://camo.githubusercontent.com/fbaa3ecc28af039c8e6011ddf473e51d2a08c8d2/68747470733a2f2f75706c6f61642d696d616765732e6a69616e7368752e696f2f75706c6f61645f696d616765732f333732323639352d666664653137306665633933316561652e706e673f696d6167654d6f6772322f6175746f2d6f7269656e742f7374726970253743696d61676556696577322f322f772f333430) | ![](https://camo.githubusercontent.com/ade43488617a69c72d5be1841fd4d0934689a3b0/68747470733a2f2f75706c6f61642d696d616765732e6a69616e7368752e696f2f75706c6f61645f696d616765732f333732323639352d316238323761353465633237346535392e706e673f696d6167654d6f6772322f6175746f2d6f7269656e742f7374726970253743696d61676556696577322f322f772f333430) |
36+
37+
### License
38+
39+
```
40+
Copyright 2019 ditclear
41+
42+
Licensed under the Apache License, Version 2.0 (the "License");
43+
you may not use this file except in compliance with the License.
44+
You may obtain a copy of the License at
45+
46+
http://www.apache.org/licenses/LICENSE-2.0
47+
48+
Unless required by applicable law or agreed to in writing, software
49+
distributed under the License is distributed on an "AS IS" BASIS,
50+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
51+
See the License for the specific language governing permissions and
52+
limitations under the License.
53+
```
54+
55+
56+
57+
58+
59+
60+
61+
62+
63+
64+

lib/helper/ui_helper.dart

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
import 'dart:core';
2+
3+
/// ui standard
4+
final standardWidth = 1400.0;
5+
final standardHeight = 900.0;
6+
7+
/// late init
8+
double screenWidth;
9+
double screenHeight;
10+
11+
/// scale [height] by [standardHeight]
12+
double realH(double height) {
13+
assert(screenHeight != 0.0);
14+
return height / standardHeight * screenHeight;
15+
}
16+
17+
// scale [width] by [ standardWidth ]
18+
double realW(double width) {
19+
assert(screenWidth != 0.0);
20+
return width / standardWidth * screenWidth;
21+
}

lib/main.dart

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
import 'package:flutter_web/material.dart';
2+
import 'package:flutter_web_challenge_profile/view/about.dart';
3+
4+
void main() => runApp(MyApp());
5+
6+
class MyApp extends StatelessWidget {
7+
// This widget is the root of your application.
8+
@override
9+
Widget build(BuildContext context) {
10+
return MaterialApp(
11+
title: 'Flutter Demo',
12+
theme: ThemeData(
13+
// This is the theme of your application.
14+
//
15+
// Try running your application with "flutter run". You'll see the
16+
// application has a blue toolbar. Then, without quitting the app, try
17+
// changing the primarySwatch below to Colors.green and then invoke
18+
// "hot reload" (press "r" in the console where you ran "flutter run",
19+
// or simply save your changes to "hot reload" in a Flutter IDE).
20+
// Notice that the counter didn't reset back to zero; the application
21+
// is not restarted.
22+
primarySwatch: Colors.blue,
23+
),
24+
home: AboutPage(),
25+
);
26+
}
27+
}

0 commit comments

Comments
 (0)