This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import "package:dio/dio.dart"; | |
import 'package:my_demo/utils/config.dart'; | |
import 'package:flutter_secure_storage/flutter_secure_storage.dart'; | |
class HttpUtil { | |
static final HttpUtil _instance = HttpUtil._internal(); | |
Dio _client; | |
FlutterSecureStorage _storage; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class _HomeTabState extends State<HomeTab> { | |
List<ImageList> _imgList = List<ImageList>(); | |
ScrollController _scrollController = ScrollController(); | |
bool isPerformingRequest = false; | |
@override | |
void initState() { | |
super.initState(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:flutter/material.dart'; | |
// 购物车 | |
class Product { | |
const Product({this.name}); | |
final String name; | |
} | |
typedef void CartChangedCallback(Product product, bool inCart); | |
class ShoppingListItem extends StatelessWidget { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:flutter/material.dart'; | |
void main() => runApp(MyApp()); | |
class MyApp extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
return MaterialApp( | |
title: 'Flutter Demo', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String.prototype.chinaLength = function() { | |
var result = this.match(/[\u0080-\uFFE5]/g); | |
if (result) { | |
return this.length + result.length; | |
} | |
return this.length; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import javax.persistence.CascadeType;//注意jar包 | |
cascade={CascadeType.REMOVE} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
一个层position:absolute | |
一个层 position: relative; | |
然后再根据z-index控制谁在上面 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$("body").live("click",function(){ | |
$(".toptask").hide(); | |
}); | |
//新建任务的模块防止事件冒泡 | |
$(".toptask").live("click",function(event){ | |
event.stopPropagation(); | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.kaishengit; | |
import java.util.Random; | |
import java.util.TimeZone; | |
import com.kaishengit.pojo.User; | |
import com.kaishengit.util.DateUtil; | |
import hirondelle.date4j.DateTime; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var date = [{"name":"不错"},{"name":"全选"},{"name":"还好"},{"name":"你好"}] | |
for(var i = 0 ; i < date.length; i ++) { | |
date[i].name//得到每个name值 | |
} |
NewerOlder