Merge pull request #1596 from abarth/moar_nine
Add a centerSlice parameter to images
This commit is contained in:
14
examples/widgets/nine_patch.dart
Normal file
14
examples/widgets/nine_patch.dart
Normal file
@@ -0,0 +1,14 @@
|
||||
// Copyright 2015 The Chromium 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/painting.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
void main() {
|
||||
runApp(new NetworkImage(
|
||||
src: "http://38.media.tumblr.com/avatar_497c78dc767d_128.png",
|
||||
fit: ImageFit.contain,
|
||||
centerSlice: new Rect.fromLTRB(40.0, 40.0, 88.0, 88.0)
|
||||
));
|
||||
}
|
||||
Reference in New Issue
Block a user