非被引用才執行

1
2
3
# 非被引用才執行
if __name__ == '__main__':
main()
閱讀全文 »

change to Stateless wedget

org

1
2
3
4
5
6
7
8
9
10
void main() {
runApp(
MaterialApp(
home: Scaffold(
backgroundColor: Colors.red,
body: Container(),
),
),
);
}
閱讀全文 »

flutter doctor

1
flutter.bat doctor --verbose
閱讀全文 »

Install

Install Flutter SDK

set correct path : D:\app\src\flutter
閱讀全文 »

prepare source for deployment

ecommerce front add server.js

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
const express = require('express');
const compression = require('compression');
const path = require('path');
const app = express();

app.use(compression());
app.use(express.static(path.join(__dirname, 'build')));

app.get('*', function(req, res) {
res.sendFile(path.join(__dirname, 'build', 'index.html'));
});

const PORT = process.env.PORT || 3000;

app.listen(PORT, () => {
console.log(`App is running on port ${PORT}`);
});
閱讀全文 »